1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -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}
22 tracksRegLiveness: true
25 ; MIPS32-LABEL: name: g_i32
26 ; MIPS32: [[DEF:%[0-9]+]]:gprb(s32) = G_IMPLICIT_DEF
27 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
28 ; MIPS32: $a0 = COPY [[DEF]](s32)
29 ; MIPS32: JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
30 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
32 %0:_(s32) = G_IMPLICIT_DEF
33 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
35 JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
36 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
44 tracksRegLiveness: true
47 ; MIPS32-LABEL: name: g_i64
48 ; MIPS32: [[DEF:%[0-9]+]]:gprb(s32) = G_IMPLICIT_DEF
49 ; MIPS32: [[DEF1:%[0-9]+]]:gprb(s32) = G_IMPLICIT_DEF
50 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
51 ; MIPS32: $a0 = COPY [[DEF]](s32)
52 ; MIPS32: $a1 = COPY [[DEF1]](s32)
53 ; MIPS32: JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
54 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
56 %0:_(s64) = G_IMPLICIT_DEF
57 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
58 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
61 JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
62 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
70 tracksRegLiveness: true
73 ; MIPS32-LABEL: name: g_float
74 ; MIPS32: [[DEF:%[0-9]+]]:fprb(s32) = G_IMPLICIT_DEF
75 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
76 ; MIPS32: $f12 = COPY [[DEF]](s32)
77 ; MIPS32: JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
78 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
80 %0:_(s32) = G_IMPLICIT_DEF
81 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
83 JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
84 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
92 tracksRegLiveness: true
96 ; MIPS32-LABEL: name: g_double
97 ; MIPS32: [[DEF:%[0-9]+]]:fprb(s64) = G_IMPLICIT_DEF
98 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
99 ; MIPS32: $d6 = COPY [[DEF]](s64)
100 ; MIPS32: JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
101 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
103 %0:_(s64) = G_IMPLICIT_DEF
104 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
106 JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
107 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp