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 @load1_s8_to_zextLoad1_s32(i8* %px) {entry: ret void}
6 define void @load2_s16_to_zextLoad2_s32(i16* %px) {entry: ret void}
7 define void @load1_s8_to_zextLoad1_s16(i8* %px) {entry: ret void}
8 define void @load1_s8_to_zextLoad1_s16_to_zextLoad1_s32(i8* %px) {entry: ret void}
9 define void @load1_s8_to_sextLoad1_s32(i8* %px) {entry: ret void}
10 define void @load2_s16_to_sextLoad2_s32(i16* %px) {entry: ret void}
11 define void @load1_s8_to_sextLoad1_s16(i8* %px) {entry: ret void}
12 define void @load1_s8_to_sextLoad1_s16_to_sextLoad1_s32(i8* %px) {entry: ret void}
16 name: load1_s8_to_zextLoad1_s32
18 tracksRegLiveness: true
23 ; MIPS32-LABEL: name: load1_s8_to_zextLoad1_s32
24 ; MIPS32: liveins: $a0
25 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
26 ; MIPS32: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
27 ; MIPS32: $v0 = COPY [[ZEXTLOAD]](s32)
28 ; MIPS32: RetRA implicit $v0
30 %2:_(s32) = G_ZEXTLOAD %0(p0) :: (load 1 from %ir.px)
36 name: load2_s16_to_zextLoad2_s32
38 tracksRegLiveness: true
43 ; MIPS32-LABEL: name: load2_s16_to_zextLoad2_s32
44 ; MIPS32: liveins: $a0
45 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
46 ; MIPS32: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load 2 from %ir.px)
47 ; MIPS32: $v0 = COPY [[ZEXTLOAD]](s32)
48 ; MIPS32: RetRA implicit $v0
50 %2:_(s32) = G_ZEXTLOAD %0(p0) :: (load 2 from %ir.px)
56 name: load1_s8_to_zextLoad1_s16
58 tracksRegLiveness: true
63 ; MIPS32-LABEL: name: load1_s8_to_zextLoad1_s16
64 ; MIPS32: liveins: $a0
65 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
66 ; MIPS32: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
67 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[ZEXTLOAD]](s32)
68 ; MIPS32: $v0 = COPY [[COPY1]](s32)
69 ; MIPS32: RetRA implicit $v0
71 %2:_(s16) = G_ZEXTLOAD %0(p0) :: (load 1 from %ir.px)
72 %3:_(s32) = G_ANYEXT %2(s16)
78 name: load1_s8_to_zextLoad1_s16_to_zextLoad1_s32
80 tracksRegLiveness: true
85 ; MIPS32-LABEL: name: load1_s8_to_zextLoad1_s16_to_zextLoad1_s32
86 ; MIPS32: liveins: $a0
87 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
88 ; MIPS32: [[ZEXTLOAD:%[0-9]+]]:_(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
89 ; MIPS32: $v0 = COPY [[ZEXTLOAD]](s32)
90 ; MIPS32: RetRA implicit $v0
92 %3:_(s32) = G_ZEXTLOAD %0(p0) :: (load 1 from %ir.px)
98 name: load1_s8_to_sextLoad1_s32
100 tracksRegLiveness: true
105 ; MIPS32-LABEL: name: load1_s8_to_sextLoad1_s32
106 ; MIPS32: liveins: $a0
107 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
108 ; MIPS32: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
109 ; MIPS32: $v0 = COPY [[SEXTLOAD]](s32)
110 ; MIPS32: RetRA implicit $v0
112 %2:_(s32) = G_SEXTLOAD %0(p0) :: (load 1 from %ir.px)
118 name: load2_s16_to_sextLoad2_s32
120 tracksRegLiveness: true
125 ; MIPS32-LABEL: name: load2_s16_to_sextLoad2_s32
126 ; MIPS32: liveins: $a0
127 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
128 ; MIPS32: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p0) :: (load 2 from %ir.px)
129 ; MIPS32: $v0 = COPY [[SEXTLOAD]](s32)
130 ; MIPS32: RetRA implicit $v0
132 %2:_(s32) = G_SEXTLOAD %0(p0) :: (load 2 from %ir.px)
138 name: load1_s8_to_sextLoad1_s16
140 tracksRegLiveness: true
145 ; MIPS32-LABEL: name: load1_s8_to_sextLoad1_s16
146 ; MIPS32: liveins: $a0
147 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
148 ; MIPS32: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
149 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SEXTLOAD]](s32)
150 ; MIPS32: $v0 = COPY [[COPY1]](s32)
151 ; MIPS32: RetRA implicit $v0
153 %2:_(s16) = G_SEXTLOAD %0(p0) :: (load 1 from %ir.px)
154 %3:_(s32) = G_ANYEXT %2(s16)
160 name: load1_s8_to_sextLoad1_s16_to_sextLoad1_s32
162 tracksRegLiveness: true
167 ; MIPS32-LABEL: name: load1_s8_to_sextLoad1_s16_to_sextLoad1_s32
168 ; MIPS32: liveins: $a0
169 ; MIPS32: [[COPY:%[0-9]+]]:_(p0) = COPY $a0
170 ; MIPS32: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p0) :: (load 1 from %ir.px)
171 ; MIPS32: $v0 = COPY [[SEXTLOAD]](s32)
172 ; MIPS32: RetRA implicit $v0
174 %3:_(s32) = G_SEXTLOAD %0(p0) :: (load 1 from %ir.px)