1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=mipsel-unknown-linux-gnu -mattr=+micromips -mcpu=mips32r2 \
3 # RUN: -verify-machineinstrs -run-pass micromips-reduce-size \
4 # RUN: %s -o - | FileCheck %s
7 define i64 @move1() { ret i64 0 }
8 define i64 @move2() { ret i64 0 }
10 declare i64 @f(i64 signext)
17 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
18 stack-id: default, callee-saved-register: '$ra', callee-saved-restored: true,
19 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
25 ; CHECK-LABEL: name: move1
26 ; CHECK: ADDIUSP_MM -24
27 ; CHECK: CFI_INSTRUCTION def_cfa_offset 24
28 ; CHECK: SWSP_MM killed $ra, $sp, 20 :: (store (s32) into %stack.0)
29 ; CHECK: CFI_INSTRUCTION offset $ra_64, -4
30 ; CHECK: JAL_MM @g, csr_o32, implicit-def dead $ra, implicit-def $sp, implicit-def $v0, implicit-def $v1
31 ; CHECK: $a0, $a1 = MOVEP_MM $v0, $v1
32 ; CHECK: JAL_MM @f, csr_o32, implicit-def dead $ra, implicit $a0, implicit $a1, implicit-def $sp, implicit-def $v0, implicit-def $v1
33 ; CHECK: $ra = LWSP_MM $sp, 20 :: (load (s32) from %stack.0)
34 ; CHECK: ADDIUSP_MM 24
35 ; CHECK: PseudoReturn undef $ra, implicit $v0, implicit $v1
37 CFI_INSTRUCTION def_cfa_offset 24
38 SW killed $ra, $sp, 20 :: (store (s32) into %stack.0)
39 CFI_INSTRUCTION offset $ra_64, -4
40 JAL_MM @g, csr_o32, implicit-def dead $ra, implicit-def $sp, implicit-def $v0, implicit-def $v1
43 JAL_MM @f, csr_o32, implicit-def dead $ra, implicit $a0, implicit $a1, implicit-def $sp, implicit-def $v0, implicit-def $v1
44 $ra = LW $sp, 20 :: (load (s32) from %stack.0)
46 PseudoReturn undef $ra, implicit $v0, implicit $v1
52 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
53 stack-id: default, callee-saved-register: '$ra', callee-saved-restored: true,
54 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
60 ; CHECK-LABEL: name: move2
61 ; CHECK: ADDIUSP_MM -24
62 ; CHECK: CFI_INSTRUCTION def_cfa_offset 24
63 ; CHECK: SWSP_MM killed $ra, $sp, 20 :: (store (s32) into %stack.0)
64 ; CHECK: CFI_INSTRUCTION offset $ra_64, -4
65 ; CHECK: JAL_MM @g, csr_o32, implicit-def dead $ra, implicit-def $sp, implicit-def $v0, implicit-def $v1
66 ; CHECK: $a0, $a1 = MOVEP_MM $v0, $v1
67 ; CHECK: JAL_MM @f, csr_o32, implicit-def dead $ra, implicit $a0, implicit $a1, implicit-def $sp, implicit-def $v0, implicit-def $v1
68 ; CHECK: $ra = LWSP_MM $sp, 20 :: (load (s32) from %stack.0)
69 ; CHECK: ADDIUSP_MM 24
70 ; CHECK: PseudoReturn undef $ra, implicit $v0, implicit $v1
72 CFI_INSTRUCTION def_cfa_offset 24
73 SW killed $ra, $sp, 20 :: (store (s32) into %stack.0)
74 CFI_INSTRUCTION offset $ra_64, -4
75 JAL_MM @g, csr_o32, implicit-def dead $ra, implicit-def $sp, implicit-def $v0, implicit-def $v1
78 JAL_MM @f, csr_o32, implicit-def dead $ra, implicit $a0, implicit $a1, implicit-def $sp, implicit-def $v0, implicit-def $v1
79 $ra = LW $sp, 20 :: (load (s32) from %stack.0)
81 PseudoReturn undef $ra, implicit $v0, implicit $v1