1 # This file tests the scenario when ISEL is the last instruction of the last 2 # Basic Block, i.e., the BB cannot fall through to its successor situation. 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 --- 18 name: testExpandISEL 19 alignment: 2 20 exposesReturnsTwice: false 21 legalized: false 22 regBankSelected: false 23 selected: false 24 tracksRegLiveness: true 25 liveins: 26 - { reg: '$x0' } 27 - { reg: '$x3' } 28 frameInfo: 29 isFrameAddressTaken: false 30 isReturnAddressTaken: false 31 hasStackMap: false 32 hasPatchPoint: false 33 stackSize: 0 34 offsetAdjustment: 0 35 maxAlignment: 0 36 adjustsStack: false 37 hasCalls: false 38 maxCallFrameSize: 0 39 hasOpaqueSPAdjustment: false 40 hasVAStart: false 41 hasMustTailInVarArgFunc: false 42 body: | 43 bb.0.entry: 44 liveins: $x0, $x3 45 46 $r5 = ADDI $r3, 1 47 $cr0 = CMPWI $r3, 0 48 $r3 = ISEL $zero, $r0, $cr0gt 49 ; CHECK: BC $cr0gt, %[[TRUE:bb.[0-9]+]] 50 ; CHECK: %[[FALSE:bb.[0-9]+]] 51 ; CHECK: $r3 = ORI $r0, 0 52 ; CHECK: B %[[SUCCESSOR:bb.[0-9]+]] 53 ; CHECK: [[TRUE]] 54 ; CHECK: $r3 = ADDI $zero, 0 55 56 57 ... 58