1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
5 declare void @f_i32(i32)
6 define void @g_i32() {entry: ret void}
8 declare void @f_i64(i64)
9 define void @g_i64() {entry: ret void}
11 declare void @f_float(float)
12 define void @g_float() {entry: ret void}
14 declare void @f_double(double)
15 define void @g_double() {entry: ret void}
23 tracksRegLiveness: true
26 ; MIPS32-LABEL: name: g_i32
27 ; MIPS32: [[DEF:%[0-9]+]]:gpr32 = IMPLICIT_DEF
28 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
29 ; MIPS32: $a0 = COPY [[DEF]]
30 ; MIPS32: JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
31 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
33 %0:gprb(s32) = G_IMPLICIT_DEF
34 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
36 JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
37 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
46 tracksRegLiveness: true
49 ; MIPS32-LABEL: name: g_i64
50 ; MIPS32: [[DEF:%[0-9]+]]:gpr32 = IMPLICIT_DEF
51 ; MIPS32: [[DEF1:%[0-9]+]]:gpr32 = IMPLICIT_DEF
52 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
53 ; MIPS32: $a0 = COPY [[DEF]]
54 ; MIPS32: $a1 = COPY [[DEF1]]
55 ; MIPS32: JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
56 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
58 %3:gprb(s32) = G_IMPLICIT_DEF
59 %4:gprb(s32) = G_IMPLICIT_DEF
60 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
63 JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
64 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
73 tracksRegLiveness: true
76 ; MIPS32-LABEL: name: g_float
77 ; MIPS32: [[DEF:%[0-9]+]]:fgr32 = IMPLICIT_DEF
78 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
79 ; MIPS32: $f12 = COPY [[DEF]]
80 ; MIPS32: JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
81 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
83 %0:fprb(s32) = G_IMPLICIT_DEF
84 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
86 JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
87 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
96 tracksRegLiveness: true
99 ; MIPS32-LABEL: name: g_double
100 ; MIPS32: [[DEF:%[0-9]+]]:afgr64 = IMPLICIT_DEF
101 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
102 ; MIPS32: $d6 = COPY [[DEF]]
103 ; MIPS32: JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
104 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
106 %0:fprb(s64) = G_IMPLICIT_DEF
107 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
109 JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
110 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp