115 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -run-pass \3# RUN: ppc-pre-emit-peephole %s -o - | FileCheck %s4--- |5 ; ModuleID = 'a.ll'6 source_filename = "a.ll"7 target datalayout = "e-m:e-i64:64-n32:64"8 9 ; Function Attrs: nounwind10 define dso_local signext i32 @b(i32 signext %a, ptr nocapture %b) local_unnamed_addr #0 {11 entry:12 %call = tail call signext i32 @g(i32 signext %a)13 store i32 %call, ptr %b, align 414 %call1 = tail call signext i32 @g(i32 signext %a)15 ret i32 %call116 }17 18 ; Function Attrs: nounwind19 declare signext i32 @g(i32 signext) local_unnamed_addr #020 21 ; Function Attrs: nounwind22 declare void @llvm.stackprotector(ptr, ptr) #023 24 attributes #0 = { nounwind }25 26...27---28name: b29alignment: 1630exposesReturnsTwice: false31legalized: false32regBankSelected: false33selected: false34failedISel: false35tracksRegLiveness: true36hasWinCFI: false37registers: []38liveins:39 - { reg: '$x3', virtual-reg: '' }40 - { reg: '$x4', virtual-reg: '' }41frameInfo:42 isFrameAddressTaken: false43 isReturnAddressTaken: false44 hasStackMap: false45 hasPatchPoint: false46 stackSize: 6447 offsetAdjustment: 048 maxAlignment: 149 adjustsStack: true50 hasCalls: true51 stackProtector: ''52 maxCallFrameSize: 3253 cvBytesOfCalleeSavedRegisters: 054 hasOpaqueSPAdjustment: false55 hasVAStart: false56 hasMustTailInVarArgFunc: false57 localFrameSize: 058 savePoint: []59 restorePoint: []60fixedStack:61 - { id: 0, type: spill-slot, offset: -80, size: 8, alignment: 16, stack-id: default,62 callee-saved-register: '$x30', callee-saved-restored: true, debug-info-variable: '',63 debug-info-expression: '', debug-info-location: '' }64 - { id: 1, type: spill-slot, offset: -88, size: 8, alignment: 8, stack-id: default,65 callee-saved-register: '$x29', callee-saved-restored: true, debug-info-variable: '',66 debug-info-expression: '', debug-info-location: '' }67stack: []68callSites: []69constants: []70machineFunctionInfo: {}71body: |72 bb.0.entry:73 liveins: $x3, $x4, $x29, $x3074 75 ; CHECK-LABEL: name: b76 ; CHECK: liveins: $x3, $x4, $x29, $x3077 ; CHECK: $x0 = MFLR8 implicit $lr878 ; CHECK: STD killed $x29, -24, $x1 :: (store (s64) into %fixed-stack.0)79 ; CHECK: STD killed $x30, -16, $x1 :: (store (s64) into %fixed-stack.1, align 16)80 ; CHECK: STD killed $x0, 16, $x181 ; CHECK: $x1 = STDU $x1, -64, $x182 ; CHECK: $x30 = OR8 killed $x4, $x483 ; CHECK: dead $r4 = LI 10, implicit-def $x484 ; CHECK: $x29 = OR8 $x3, $x385 ; CHECK: BL8_NOP @g, csr_ppc64_r2_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit $x2, implicit-def $r1, implicit-def $x386 ; CHECK: STW8 killed renamable $x3, 0, killed renamable $x30 :: (store (s32) into %ir.b)87 ; CHECK: $x3 = OR8 killed $x29, $x2988 ; CHECK: BL8_NOP @g, csr_ppc64_r2_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x389 ; CHECK: $x1 = ADDI8 $x1, 6490 ; CHECK: $x0 = LD 16, $x191 ; CHECK: $x30 = LD -16, $x1 :: (load (s64) from %fixed-stack.1, align 16)92 ; CHECK: $x29 = LD -24, $x1 :: (load (s64) from %fixed-stack.0)93 ; CHECK: MTLR8 killed $x0, implicit-def $lr894 ; CHECK: BLR8 implicit $lr8, implicit $rm, implicit killed $x395 $x0 = MFLR8 implicit $lr896 STD killed $x29, -24, $x1 :: (store (s64) into %fixed-stack.1)97 STD killed $x30, -16, $x1 :: (store (s64) into %fixed-stack.0, align 16)98 STD killed $x0, 16, $x199 $x1 = STDU $x1, -64, $x1100 $x30 = OR8 killed $x4, $x4101 dead $r4 = LI 10, implicit-def $x4102 $x29 = OR8 $x3, $x3103 BL8_NOP @g, csr_ppc64_r2_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit $x2, implicit-def $r1, implicit-def $x3104 STW8 killed renamable $x3, 0, killed renamable $x30 :: (store (s32) into %ir.b)105 $x3 = OR8 killed $x29, $x29106 BL8_NOP @g, csr_ppc64_r2_altivec, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1, implicit-def $x3107 $x1 = ADDI8 $x1, 64108 $x0 = LD 16, $x1109 $x30 = LD -16, $x1 :: (load (s64) from %fixed-stack.0, align 16)110 $x29 = LD -24, $x1 :: (load (s64) from %fixed-stack.1)111 MTLR8 killed $x0, implicit-def $lr8112 BLR8 implicit $lr8, implicit $rm, implicit killed $x3113 114...115