1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -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}
21 tracksRegLiveness: true
24 ; MIPS32-LABEL: name: g_i32
25 ; MIPS32: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
26 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
27 ; MIPS32: $a0 = COPY [[DEF]](s32)
28 ; MIPS32: JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
29 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
31 %0:_(s32) = G_IMPLICIT_DEF
32 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
34 JAL @f_i32, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0
35 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
42 tracksRegLiveness: true
45 ; MIPS32-LABEL: name: g_i64
46 ; MIPS32: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
47 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
48 ; MIPS32: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](s64)
49 ; MIPS32: $a0 = COPY [[UV]](s32)
50 ; MIPS32: $a1 = COPY [[UV1]](s32)
51 ; MIPS32: JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
52 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
54 %0:_(s64) = G_IMPLICIT_DEF
55 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
56 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
59 JAL @f_i64, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1
60 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
67 tracksRegLiveness: true
70 ; MIPS32-LABEL: name: g_float
71 ; MIPS32: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
72 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
73 ; MIPS32: $f12 = COPY [[DEF]](s32)
74 ; MIPS32: JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
75 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
77 %0:_(s32) = G_IMPLICIT_DEF
78 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
80 JAL @f_float, csr_o32, implicit-def $ra, implicit-def $sp, implicit $f12
81 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
88 tracksRegLiveness: true
91 ; MIPS32-LABEL: name: g_double
92 ; MIPS32: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
93 ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
94 ; MIPS32: $d6 = COPY [[DEF]](s64)
95 ; MIPS32: JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
96 ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
98 %0:_(s64) = G_IMPLICIT_DEF
99 ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
101 JAL @f_double, csr_o32, implicit-def $ra, implicit-def $sp, implicit $d6
102 ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp