1 # This file tests the scenario: ISEL RX, RY, RZ, CR (X != 0 && Y != 0, Z != 0)
2 # RUN: llc -ppc-gen-isel=false -run-pass ppc-expand-isel -o - %s | FileCheck %s
5 target datalayout = "E-m:e-i64:64-n32:64"
6 target triple = "powerpc64-unknown-linux-gnu"
7 define signext i32 @testExpandISEL(i32 signext %i, i32 signext %j) {
9 %cmp = icmp sgt i32 %i, 0
10 %add = add nsw i32 %i, 1
11 %cond = select i1 %cmp, i32 %add, i32 %j
19 exposesReturnsTwice: false
21 regBankSelected: false
23 tracksRegLiveness: true
29 isFrameAddressTaken: false
30 isReturnAddressTaken: false
39 hasOpaqueSPAdjustment: false
41 hasMustTailInVarArgFunc: false
44 liveins: $x3, $x4, $x5
48 $r5 = ISEL $r3, $r4, $cr0gt
49 ; CHECK: BC $cr0gt, %[[TRUE:bb.[0-9]+]]
50 ; CHECK: %[[FALSE:bb.[0-9]+]]
51 ; CHECK: $r5 = ORI $r4, 0
52 ; CHECK: B %[[SUCCESSOR:bb.[0-9]+]]
54 ; CHECK: $r5 = ADDI $r3, 0