1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=regbankselect \
3 # RUN: -simplify-mir -verify-machineinstrs %s \
4 # RUN: -o - | FileCheck -check-prefix=RV32I %s
9 tracksRegLiveness: true
14 ; RV32I-LABEL: name: load_i8
15 ; RV32I: liveins: $x10
17 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
18 ; RV32I-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s8))
19 ; RV32I-NEXT: $x10 = COPY [[LOAD]](s32)
20 ; RV32I-NEXT: PseudoRET implicit $x10
22 %3:_(s32) = G_LOAD %0(p0) :: (load (s8))
24 PseudoRET implicit $x10
30 tracksRegLiveness: true
35 ; RV32I-LABEL: name: load_i16
36 ; RV32I: liveins: $x10
38 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
39 ; RV32I-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s16))
40 ; RV32I-NEXT: $x10 = COPY [[LOAD]](s32)
41 ; RV32I-NEXT: PseudoRET implicit $x10
43 %3:_(s32) = G_LOAD %0(p0) :: (load (s16))
45 PseudoRET implicit $x10
51 tracksRegLiveness: true
56 ; RV32I-LABEL: name: load_i32
57 ; RV32I: liveins: $x10
59 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
60 ; RV32I-NEXT: [[LOAD:%[0-9]+]]:gprb(s32) = G_LOAD [[COPY]](p0) :: (load (s32))
61 ; RV32I-NEXT: $x10 = COPY [[LOAD]](s32)
62 ; RV32I-NEXT: PseudoRET implicit $x10
64 %3:_(s32) = G_LOAD %0(p0) :: (load (s32))
66 PseudoRET implicit $x10
72 tracksRegLiveness: true
77 ; RV32I-LABEL: name: load_ptr
78 ; RV32I: liveins: $x10
80 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
81 ; RV32I-NEXT: [[LOAD:%[0-9]+]]:gprb(p0) = G_LOAD [[COPY]](p0) :: (load (p0))
82 ; RV32I-NEXT: $x10 = COPY [[LOAD]](p0)
83 ; RV32I-NEXT: PseudoRET implicit $x10
85 %3:_(p0) = G_LOAD %0(p0) :: (load (p0))
87 PseudoRET implicit $x10
93 tracksRegLiveness: true
98 ; RV32I-LABEL: name: zextload_i8
99 ; RV32I: liveins: $x10
101 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
102 ; RV32I-NEXT: [[ZEXTLOAD:%[0-9]+]]:gprb(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load (s8))
103 ; RV32I-NEXT: $x10 = COPY [[ZEXTLOAD]](s32)
104 ; RV32I-NEXT: PseudoRET implicit $x10
106 %1:_(s32) = G_ZEXTLOAD %0(p0) :: (load (s8))
108 PseudoRET implicit $x10
114 tracksRegLiveness: true
119 ; RV32I-LABEL: name: zextload_i16
120 ; RV32I: liveins: $x10
122 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
123 ; RV32I-NEXT: [[ZEXTLOAD:%[0-9]+]]:gprb(s32) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16))
124 ; RV32I-NEXT: $x10 = COPY [[ZEXTLOAD]](s32)
125 ; RV32I-NEXT: PseudoRET implicit $x10
127 %1:_(s32) = G_ZEXTLOAD %0(p0) :: (load (s16))
129 PseudoRET implicit $x10
135 tracksRegLiveness: true
140 ; RV32I-LABEL: name: sextload_i8
141 ; RV32I: liveins: $x10
143 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
144 ; RV32I-NEXT: [[SEXTLOAD:%[0-9]+]]:gprb(s32) = G_SEXTLOAD [[COPY]](p0) :: (load (s8))
145 ; RV32I-NEXT: $x10 = COPY [[SEXTLOAD]](s32)
146 ; RV32I-NEXT: PseudoRET implicit $x10
148 %1:_(s32) = G_SEXTLOAD %0(p0) :: (load (s8))
150 PseudoRET implicit $x10
156 tracksRegLiveness: true
161 ; RV32I-LABEL: name: sextload_i16
162 ; RV32I: liveins: $x10
164 ; RV32I-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
165 ; RV32I-NEXT: [[SEXTLOAD:%[0-9]+]]:gprb(s32) = G_SEXTLOAD [[COPY]](p0) :: (load (s16))
166 ; RV32I-NEXT: $x10 = COPY [[SEXTLOAD]](s32)
167 ; RV32I-NEXT: PseudoRET implicit $x10
169 %1:_(s32) = G_SEXTLOAD %0(p0) :: (load (s16))
171 PseudoRET implicit $x10