1 # This file tests the scenario: ISEL R0, ZERO, RX, CR (X != 0)
2 # It also tests redundant liveins ($x7) and killed registers.
3 # RUN: llc -ppc-gen-isel=false -run-pass ppc-expand-isel -o - %s | FileCheck %s
6 target datalayout = "E-m:e-i64:64-n32:64"
7 target triple = "powerpc64-unknown-linux-gnu"
8 define signext i32 @testExpandISEL(i32 signext %i, i32 signext %j) {
10 %cmp = icmp sgt i32 %i, 0
11 %add = add nsw i32 %i, 1
12 %cond = select i1 %cmp, i32 %add, i32 %j
20 exposesReturnsTwice: false
22 regBankSelected: false
24 tracksRegLiveness: true
30 isFrameAddressTaken: false
31 isReturnAddressTaken: false
40 hasOpaqueSPAdjustment: false
42 hasMustTailInVarArgFunc: false
45 liveins: $x0, $x3, $x7
49 $r0 = ISEL killed $zero, killed $r5, killed $cr0gt, implicit killed $cr0
50 ; CHECK: BC killed $cr0gt, %[[TRUE:bb.[0-9]+]]
51 ; CHECK: %[[FALSE:bb.[0-9]+]]
52 ; CHECK: $r0 = ORI killed $r5, 0
53 ; CHECK: B %[[SUCCESSOR:bb.[0-9]+]]
55 ; CHECK: $r0 = ADDI killed $zero, 0
57 $x0 = EXTSW_32_64 killed $r0