brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · f7da113 Raw
103 lines · plain
1# RUN: llc -mtriple=mipsel -mattr=mips16 -relocation-model=pic -run-pass none -o - %s | FileCheck %s2# This test ensures that the MIR parser parses the call entry pseudo source3# values in memory operands correctly.4 5--- |6  define i32 @test(i32 %a) {7  entry:8    %call = call i32 @foo(i32 %a)9    ret i32 010  }11 12  declare i32 @foo(i32)13 14  define float @test2() #0 {15  entry:16    %call = tail call float @g()17    call void @__mips16_ret_sf(float %call)18    ret float %call19  }20 21  declare float @g(...)22 23  declare void @__mips16_ret_sf(float) #124 25  attributes #0 = { "saveS2" }26  attributes #1 = { noinline readnone "__Mips16RetHelper" }27...28---29name:            test30tracksRegLiveness: true31liveins:32  - { reg: '$a0' }33frameInfo:34  stackSize:       2435  maxAlignment:    436  adjustsStack:    true37  hasCalls:        true38  maxCallFrameSize: 1639stack:40  - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4,41      callee-saved-register: '$ra' }42body:             |43  bb.0.entry:44    liveins: $a0, $ra45 46    Save16 $ra, 24, implicit-def $sp, implicit $sp47    CFI_INSTRUCTION def_cfa_offset 2448    CFI_INSTRUCTION offset $ra_64, -449    $v0, $v1 = GotPrologue16 &_gp_disp, &_gp_disp50    $v0 = SllX16 killed $v0, 1651    $v0 = AdduRxRyRz16 killed $v1, killed $v052  ; CHECK-LABEL: name: test53  ; CHECK: $v1 = LwRxRyOffMemX16 $v0, @foo :: (load (s32) from call-entry @foo)54    $v1 = LwRxRyOffMemX16 $v0, @foo :: (load (s32) from call-entry @foo)55    $t9 = COPY $v156    $gp = COPY killed $v057    JumpLinkReg16 killed $v1, csr_o32, implicit-def $ra, implicit killed $t9, implicit $a0, implicit killed $gp, implicit-def $sp, implicit-def dead $v058    $v0 = LiRxImmX16 059    $ra = Restore16 24, implicit-def $sp, implicit $sp60    RetRA16 implicit $v061...62---63name:            test264tracksRegLiveness: true65frameInfo:66  stackSize:       3267  maxAlignment:    468  adjustsStack:    true69  hasCalls:        true70  maxCallFrameSize: 1671stack:72  - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4,73      callee-saved-register: '$ra' }74  - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4,75      callee-saved-register: '$s2' }76  - { id: 2, type: spill-slot, offset: -12, size: 4, alignment: 4,77      callee-saved-register: '$s0' }78body:             |79  bb.0.entry:80    liveins: $ra, $s2, $s0, $ra, $s2, $s081 82    SaveX16 $s0, $ra, $s2, 32, implicit-def $sp, implicit $sp83    CFI_INSTRUCTION def_cfa_offset 3284    CFI_INSTRUCTION offset $ra_64, -485    CFI_INSTRUCTION offset $s2_64, -886    CFI_INSTRUCTION offset $s0_64, -1287    $v0, $v1 = GotPrologue16 &_gp_disp, &_gp_disp88    $v0 = SllX16 killed $v0, 1689    $s0 = AdduRxRyRz16 killed $v1, killed $v090    $v0 = LwRxRyOffMemX16 $s0, @g :: (load (s32) from call-entry @g)91  ; CHECK-LABEL: test292  ; CHECK: $v1 = LwRxRyOffMemX16 $s0, &__mips16_call_stub_sf_0 :: (load (s32) from call-entry &__mips16_call_stub_sf_0)93    $v1 = LwRxRyOffMemX16 $s0, &__mips16_call_stub_sf_0 :: (load (s32) from call-entry &__mips16_call_stub_sf_0)94    $gp = COPY $s095    JumpLinkReg16 killed $v1, csr_o32, implicit-def $ra, implicit $v0, implicit killed $gp, implicit-def $sp, implicit-def $v096    $v1 = LwRxRyOffMemX16 $s0, @__mips16_ret_sf :: (load (s32) from call-entry @__mips16_ret_sf)97    $t9 = COPY $v198    $gp = COPY killed $s099    JumpLinkReg16 killed $v1, csr_mips16rethelper, implicit-def $ra, implicit killed $t9, implicit $v0, implicit killed $gp, implicit-def $sp100    $s0, $ra, $s2 = RestoreX16 32, implicit-def $sp, implicit $sp101    RetRA16 implicit $v0102...103