1 # RUN: llc -verify-machineinstrs -start-before=ppc-pre-emit-peephole %s -o - | FileCheck %s
3 target datalayout = "e-m:e-i64:64-n32:64"
4 target triple = "powerpc64le-unknown-linux-gnu"
6 declare signext i32 @callee(i32 signext)
8 define signext i32 @func(i32 signext %v) {
15 exposesReturnsTwice: false
17 regBankSelected: false
20 tracksRegLiveness: true
23 - { reg: '$x3', virtual-reg: '' }
25 isFrameAddressTaken: false
26 isReturnAddressTaken: false
36 hasOpaqueSPAdjustment: false
38 hasMustTailInVarArgFunc: false
43 - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, stack-id: default,
44 callee-saved-register: '$x30', callee-saved-restored: true, debug-info-variable: '',
45 debug-info-expression: '', debug-info-location: '' }
51 successors: %bb.2(0x30000000), %bb.1(0x50000000)
54 ; bc should be converted into b
62 $x0 = MFLR8 implicit $lr8
63 STD killed $x0, 16, $x1
64 $x1 = STDU $x1, -48, $x1
65 STD killed $x30, 32, $x1 :: (store (s64) into %fixed-stack.0, align 16)
67 BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x3
68 renamable $cr0 = CMPLWI renamable $r3, 0
69 BCC 76, killed renamable $cr0, %bb.2
72 successors: %bb.5(0x40000000), %bb.2(0x40000000)
75 renamable $x3 = EXTSW_32_64 killed renamable $r3, implicit $x3
76 BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x3
77 renamable $cr2un = CRSET
78 $cr2gt = CROR $cr2un, $cr2un
79 $x30 = OR8 killed $x3, $x3
80 BC killed renamable $cr2un, %bb.5
84 successors: %bb.5(0x80000000)
88 BL8_NOP @callee, csr_ppc64_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def dead $x3
93 renamable $x3 = EXTSW_32_64 killed renamable $r30, implicit $x30
94 $x30 = LD 32, $x1 :: (load (s64) from %fixed-stack.0, align 16)
97 MTLR8 killed $x0, implicit-def $lr8
98 BLR8 implicit $lr8, implicit $rm, implicit killed $x3
101 successors: %bb.5(0x40000000), %bb.4(0x40000000)
104 renamable $cr0 = CMPWI renamable $r30, -1
105 BCn killed renamable $cr0gt, %bb.4