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-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
24 ; MIPS32-NEXT: $v0 = COPY [[C1]](s32)
25 ; MIPS32-NEXT: $v1 = COPY [[C]](s32)
26 ; MIPS32-NEXT: 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-NEXT: $v0 = COPY [[C]](s32)
43 ; MIPS32-NEXT: 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-NEXT: $v0 = COPY [[C]](s32)
58 ; MIPS32-NEXT: RetRA implicit $v0
59 %0:_(s16) = G_CONSTANT i16 -32768
60 %1:_(s32) = G_SEXT %0(s16)
68 tracksRegLiveness: true
71 ; MIPS32-LABEL: name: signed_i8
72 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -128
73 ; MIPS32-NEXT: $v0 = COPY [[C]](s32)
74 ; MIPS32-NEXT: RetRA implicit $v0
75 %0:_(s8) = G_CONSTANT i8 -128
76 %1:_(s32) = G_SEXT %0(s8)
84 tracksRegLiveness: true
87 ; MIPS32-LABEL: name: unsigned_i16
88 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32768
89 ; MIPS32-NEXT: $v0 = COPY [[C]](s32)
90 ; MIPS32-NEXT: RetRA implicit $v0
91 %0:_(s16) = G_CONSTANT i16 -32768
92 %1:_(s32) = G_ZEXT %0(s16)
100 tracksRegLiveness: true
103 ; MIPS32-LABEL: name: unsigned_i8
104 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 128
105 ; MIPS32-NEXT: $v0 = COPY [[C]](s32)
106 ; MIPS32-NEXT: RetRA implicit $v0
107 %0:_(s8) = G_CONSTANT i8 -128
108 %1:_(s32) = G_ZEXT %0(s8)
116 tracksRegLiveness: true
119 ; MIPS32-LABEL: name: i1_true
120 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
121 ; MIPS32-NEXT: $v0 = COPY [[C]](s32)
122 ; MIPS32-NEXT: RetRA implicit $v0
123 %0:_(s1) = G_CONSTANT i1 true
124 %1:_(s32) = G_ZEXT %0(s1)
132 tracksRegLiveness: true
135 ; MIPS32-LABEL: name: i1_false
136 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
137 ; MIPS32-NEXT: $v0 = COPY [[C]](s32)
138 ; MIPS32-NEXT: RetRA implicit $v0
139 %0:_(s1) = G_CONSTANT i1 false
140 %1:_(s32) = G_ZEXT %0(s1)