1 # RUN: llc -march=mips -start-before=finalize-isel \
2 # RUN: -stop-after=finalize-isel -relocation-model=pic \
5 # A simple test to show that we can parse the target specific flags: got-call,
9 @v = global i32 0, align 4
10 @j = external global i32, align 4
12 define i32 @_Z2k1i(i32 signext %asd) {
14 %call = tail call i32 @_Z1gi(i32 signext %asd)
15 %add = add nsw i32 %call, %asd
16 %0 = load i32, ptr @v, align 4
17 %add1 = add nsw i32 %add, %0
18 %1 = load i32, ptr @j, align 4
19 %add2 = add nsw i32 %add1, %1
23 declare i32 @_Z1gi(i32 signext)
28 exposesReturnsTwice: false
30 regBankSelected: false
32 tracksRegLiveness: true
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: '' }
48 - { reg: '$a0', virtual-reg: '%0' }
49 - { reg: '$t9', virtual-reg: '' }
50 - { reg: '$v0', virtual-reg: '' }
52 isFrameAddressTaken: false
53 isReturnAddressTaken: false
62 maxCallFrameSize: 4294967295
63 hasOpaqueSPAdjustment: false
65 hasMustTailInVarArgFunc: false
73 liveins: $a0, $t9, $v0
77 ADJCALLSTACKDOWN 16, 0, implicit-def dead $sp, implicit $sp
78 %2 = LW %1, target-flags(mips-got-call) @_Z1gi :: (load (s32) from call-entry @_Z1gi)
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
85 %5 = LW %1, target-flags(mips-got) @v :: (load (s32) from got)
86 %6 = LW killed %5, 0 :: (dereferenceable load (s32) from @v)
87 %7 = ADDu killed %4, killed %6
88 %8 = LW %1, target-flags(mips-got) @j :: (load (s32) from got)
89 %9 = LW killed %8, 0 :: (dereferenceable load (s32) from @j)
90 %10 = ADDu killed %7, killed %9