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 define void @any_i64() {entry: ret void}
6 define void @any_i32() {entry: ret void}
7 define void @signed_i16() {entry: ret void}
8 define void @signed_i8() {entry: ret void}
9 define void @unsigned_i16() {entry: ret void}
10 define void @unsigned_i8() {entry: ret void}
11 define void @i1_true() {entry: ret void}
12 define void @i1_false() {entry: ret void}
18 tracksRegLiveness: true
21 ; MIPS32-LABEL: name: any_i64
22 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
23 ; MIPS32: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
24 ; MIPS32: $v0 = COPY [[C1]](s32)
25 ; MIPS32: $v1 = COPY [[C]](s32)
26 ; MIPS32: RetRA implicit $v0, implicit $v1
27 %0:_(s64) = G_CONSTANT i64 -9223372036854775808
28 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0(s64)
31 RetRA implicit $v0, implicit $v1
37 tracksRegLiveness: true
40 ; MIPS32-LABEL: name: any_i32
41 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
42 ; MIPS32: $v0 = COPY [[C]](s32)
43 ; MIPS32: RetRA implicit $v0
44 %0:_(s32) = G_CONSTANT i32 -2147483648
52 tracksRegLiveness: true
55 ; MIPS32-LABEL: name: signed_i16
56 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -32768
57 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
58 ; MIPS32: $v0 = COPY [[COPY]](s32)
59 ; MIPS32: RetRA implicit $v0
60 %0:_(s16) = G_CONSTANT i16 -32768
61 %1:_(s32) = G_SEXT %0(s16)
69 tracksRegLiveness: true
72 ; MIPS32-LABEL: name: signed_i8
73 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -128
74 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
75 ; MIPS32: $v0 = COPY [[COPY]](s32)
76 ; MIPS32: RetRA implicit $v0
77 %0:_(s8) = G_CONSTANT i8 -128
78 %1:_(s32) = G_SEXT %0(s8)
86 tracksRegLiveness: true
89 ; MIPS32-LABEL: name: unsigned_i16
90 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32768
91 ; MIPS32: $v0 = COPY [[C]](s32)
92 ; MIPS32: RetRA implicit $v0
93 %0:_(s16) = G_CONSTANT i16 -32768
94 %1:_(s32) = G_ZEXT %0(s16)
102 tracksRegLiveness: true
105 ; MIPS32-LABEL: name: unsigned_i8
106 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 128
107 ; MIPS32: $v0 = COPY [[C]](s32)
108 ; MIPS32: RetRA implicit $v0
109 %0:_(s8) = G_CONSTANT i8 -128
110 %1:_(s32) = G_ZEXT %0(s8)
118 tracksRegLiveness: true
121 ; MIPS32-LABEL: name: i1_true
122 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
123 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
124 ; MIPS32: $v0 = COPY [[COPY]](s32)
125 ; MIPS32: RetRA implicit $v0
126 %0:_(s1) = G_CONSTANT i1 true
127 %1:_(s32) = G_ZEXT %0(s1)
135 tracksRegLiveness: true
138 ; MIPS32-LABEL: name: i1_false
139 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
140 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
141 ; MIPS32: $v0 = COPY [[COPY]](s32)
142 ; MIPS32: RetRA implicit $v0
143 %0:_(s1) = G_CONSTANT i1 false
144 %1:_(s32) = G_ZEXT %0(s1)