1# RUN: llc -march=mips -start-before=finalize-isel \ 2# RUN: -stop-after=finalize-isel -relocation-model=pic \ 3# RUN: -o /dev/null %s 4 5# A simple test to show that we can parse the target specific flags: got-call, 6# got. 7 8--- | 9 @v = global i32 0, align 4 10 @j = external global i32, align 4 11 12 define i32 @_Z2k1i(i32 signext %asd) { 13 entry: 14 %call = tail call i32 @_Z1gi(i32 signext %asd) 15 %add = add nsw i32 %call, %asd 16 %0 = load i32, i32* @v, align 4 17 %add1 = add nsw i32 %add, %0 18 %1 = load i32, i32* @j, align 4 19 %add2 = add nsw i32 %add1, %1 20 ret i32 %add2 21 } 22 23 declare i32 @_Z1gi(i32 signext) 24... 25--- 26name: _Z2k1i 27alignment: 4 28exposesReturnsTwice: false 29legalized: false 30regBankSelected: false 31selected: false 32tracksRegLiveness: true 33registers: 34 - { id: 0, class: gpr32, preferred-register: '' } 35 - { id: 1, class: gpr32, preferred-register: '' } 36 - { id: 2, class: gpr32, preferred-register: '' } 37 - { id: 3, class: gpr32, preferred-register: '' } 38 - { id: 4, class: gpr32, preferred-register: '' } 39 - { id: 5, class: gpr32, preferred-register: '' } 40 - { id: 6, class: gpr32, preferred-register: '' } 41 - { id: 7, class: gpr32, preferred-register: '' } 42 - { id: 8, class: gpr32, preferred-register: '' } 43 - { id: 9, class: gpr32, preferred-register: '' } 44 - { id: 10, class: gpr32, preferred-register: '' } 45 - { id: 11, class: gpr32, preferred-register: '' } 46 - { id: 12, class: gpr32, preferred-register: '' } 47liveins: 48 - { reg: '$a0', virtual-reg: '%0' } 49 - { reg: '$t9', virtual-reg: '' } 50 - { reg: '$v0', virtual-reg: '' } 51frameInfo: 52 isFrameAddressTaken: false 53 isReturnAddressTaken: false 54 hasStackMap: false 55 hasPatchPoint: false 56 stackSize: 0 57 offsetAdjustment: 0 58 maxAlignment: 1 59 adjustsStack: false 60 hasCalls: true 61 stackProtector: '' 62 maxCallFrameSize: 4294967295 63 hasOpaqueSPAdjustment: false 64 hasVAStart: false 65 hasMustTailInVarArgFunc: false 66 savePoint: '' 67 restorePoint: '' 68fixedStack: 69stack: 70constants: 71body: | 72 bb.0.entry: 73 liveins: $a0, $t9, $v0 74 75 %1 = ADDu $v0, $t9 76 %0 = COPY $a0 77 ADJCALLSTACKDOWN 16, 0, implicit-def dead $sp, implicit $sp 78 %2 = LW %1, target-flags(mips-got-call) @_Z1gi :: (load 4 from call-entry @_Z1gi) 79 $a0 = COPY %0 80 $gp = COPY %1 81 JALRPseudo killed %2, csr_o32_fpxx, implicit-def dead $ra, implicit $a0, implicit $gp, implicit-def $sp, implicit-def $v0 82 ADJCALLSTACKUP 16, 0, implicit-def dead $sp, implicit $sp 83 %3 = COPY $v0 84 %4 = ADDu %3, %0 85 %5 = LW %1, target-flags(mips-got) @v :: (load 4 from got) 86 %6 = LW killed %5, 0 :: (dereferenceable load 4 from @v) 87 %7 = ADDu killed %4, killed %6 88 %8 = LW %1, target-flags(mips-got) @j :: (load 4 from got) 89 %9 = LW killed %8, 0 :: (dereferenceable load 4 from @j) 90 %10 = ADDu killed %7, killed %9 91 $v0 = COPY %10 92 RetRA implicit $v0 93 94... 95 96