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 4 5--- | 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) { 9 entry: 10 %cmp = icmp sgt i32 %i, 0 11 %add = add nsw i32 %i, 1 12 %cond = select i1 %cmp, i32 %add, i32 %j 13 ret i32 %cond 14 } 15 16... 17--- 18name: testExpandISEL 19alignment: 4 20exposesReturnsTwice: false 21legalized: false 22regBankSelected: false 23selected: false 24tracksRegLiveness: true 25liveins: 26 - { reg: '$x0' } 27 - { reg: '$x3' } 28 - { reg: '$x7' } 29frameInfo: 30 isFrameAddressTaken: false 31 isReturnAddressTaken: false 32 hasStackMap: false 33 hasPatchPoint: false 34 stackSize: 0 35 offsetAdjustment: 0 36 maxAlignment: 0 37 adjustsStack: false 38 hasCalls: false 39 maxCallFrameSize: 0 40 hasOpaqueSPAdjustment: false 41 hasVAStart: false 42 hasMustTailInVarArgFunc: false 43body: | 44 bb.0.entry: 45 liveins: $x0, $x3, $x7 46 47 $r5 = ADDI $r3, 1 48 $cr0 = CMPWI $r3, 0 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]+]] 54 ; CHECK: [[TRUE]] 55 ; CHECK: $r0 = ADDI killed $zero, 0 56 57 $x0 = EXTSW_32_64 killed $r0 58 59... 60