1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - %s -mtriple=x86_64-unknown-linux-gnu --run-pass=peephole-opt | FileCheck %s
4 # Test that TEST64rr is erased in `test_erased`, and kept in `test_not_erased_when_sf_used`
5 # and `test_not_erased_when_eflags_change`.
9 source_filename = "tmp.ll"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
12 define i64 @test_erased(ptr %0, i64 %1, i64 %2) {
13 %4 = load i64, ptr %0, align 8
15 %6 = icmp eq i64 %5, 0
16 %7 = select i1 %6, i64 %1, i64 %5
17 store i64 %7, ptr %0, align 8
21 define i64 @test_not_erased_when_sf_used(ptr %0, i64 %1, i64 %2, i64 %3) {
22 %5 = load i64, ptr %0, align 8
24 %7 = icmp slt i64 %6, 0
25 %8 = select i1 %7, i64 %1, i64 %6
26 store i64 %8, ptr %0, align 8
30 define void @test_not_erased_when_eflags_change(ptr %0, i64 %1, i64 %2, i64 %3, ptr %4) {
31 %6 = load i64, ptr %0, align 8
34 %9 = icmp eq i64 %7, 0
35 %10 = select i1 %9, i64 %1, i64 %7
36 store i64 %10, ptr %0, align 8
37 store i64 %8, ptr %4, align 8
41 define i16 @erase_test16(i16 %0, i16 %1, ptr nocapture %2) {
43 %3 = icmp ne i16 %0, 0
45 %5 = icmp eq i16 %4, 0
46 %6 = select i1 %3, i1 %5, i1 false
47 br i1 %6, label %if.then, label %if.end
49 if.then: ; preds = %entry
50 store i16 %0, ptr %2, align 4
53 if.end: ; preds = %if.then, %entry
57 define i16 @erase_test16_bigimm(i16 %0, i32 %1, ptr nocapture %2) {
59 %3 = icmp ne i16 %0, 0
60 %4 = and i32 %1, 123456
61 %trunc = trunc i32 %4 to i16
62 %5 = icmp eq i16 %trunc, 0
63 %6 = select i1 %3, i1 %5, i1 false
64 br i1 %6, label %if.then, label %if.end
66 if.then: ; preds = %entry
67 store i32 %4, ptr %2, align 4
70 if.end: ; preds = %if.then, %entry
74 define i16 @erase_test16_sf(i16 %0, i16 %1, ptr nocapture %2) {
76 %3 = icmp ne i16 %0, 0
78 %5 = icmp slt i16 %4, 0
79 %6 = select i1 %3, i1 %5, i1 false
80 br i1 %6, label %if.then, label %if.end
82 if.then: ; preds = %entry
83 store i16 %4, ptr %2, align 4
86 if.end: ; preds = %if.then, %entry
93 tracksDebugUserValues: false
95 - { id: 0, class: gr64, preferred-register: '' }
96 - { id: 1, class: gr64, preferred-register: '' }
97 - { id: 2, class: gr64, preferred-register: '' }
98 - { id: 3, class: gr64, preferred-register: '' }
99 - { id: 4, class: gr32, preferred-register: '' }
100 - { id: 5, class: gr32, preferred-register: '' }
101 - { id: 6, class: gr64, preferred-register: '' }
102 - { id: 7, class: gr64, preferred-register: '' }
104 - { reg: '$rdi', virtual-reg: '%0' }
105 - { reg: '$rsi', virtual-reg: '%1' }
108 machineFunctionInfo: {}
113 ; CHECK-LABEL: name: test_erased
114 ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
115 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
116 ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
117 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr32 = COPY [[MOV64rm]].sub_32bit
118 ; CHECK-NEXT: [[AND32ri8_:%[0-9]+]]:gr32 = AND32ri8 [[COPY2]], 3, implicit-def $eflags
119 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, killed [[AND32ri8_]], %subreg.sub_32bit
120 ; CHECK-NEXT: [[CMOV64rr:%[0-9]+]]:gr64 = CMOV64rr [[SUBREG_TO_REG]], [[COPY]], 4, implicit $eflags
121 ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[CMOV64rr]] :: (store (s64) into %ir.0)
122 ; CHECK-NEXT: $rax = COPY [[SUBREG_TO_REG]]
123 ; CHECK-NEXT: RET 0, $rax
126 %3:gr64 = MOV64rm %0, 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
127 %4:gr32 = COPY %3.sub_32bit
128 %5:gr32 = AND32ri8 %4, 3, implicit-def dead $eflags
129 %6:gr64 = SUBREG_TO_REG 0, killed %5, %subreg.sub_32bit
130 TEST64rr %6, %6, implicit-def $eflags
131 %7:gr64 = CMOV64rr %6, %1, 4, implicit $eflags
132 MOV64mr %0, 1, $noreg, 0, $noreg, killed %7 :: (store (s64) into %ir.0)
138 name: test_not_erased_when_sf_used
140 tracksDebugUserValues: false
142 - { id: 0, class: gr64, preferred-register: '' }
143 - { id: 1, class: gr64, preferred-register: '' }
144 - { id: 2, class: gr64, preferred-register: '' }
145 - { id: 3, class: gr64, preferred-register: '' }
146 - { id: 4, class: gr64, preferred-register: '' }
147 - { id: 5, class: gr32, preferred-register: '' }
148 - { id: 6, class: gr32, preferred-register: '' }
149 - { id: 7, class: gr64, preferred-register: '' }
150 - { id: 8, class: gr64, preferred-register: '' }
152 - { reg: '$rdi', virtual-reg: '%0' }
153 - { reg: '$rsi', virtual-reg: '%1' }
156 machineFunctionInfo: {}
161 ; CHECK-LABEL: name: test_not_erased_when_sf_used
162 ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
163 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
164 ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
165 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr32 = COPY [[MOV64rm]].sub_32bit
166 ; CHECK-NEXT: [[AND32ri8_:%[0-9]+]]:gr32 = AND32ri8 [[COPY2]], 3, implicit-def dead $eflags
167 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, killed [[AND32ri8_]], %subreg.sub_32bit
168 ; CHECK-NEXT: TEST64rr [[SUBREG_TO_REG]], [[SUBREG_TO_REG]], implicit-def $eflags
169 ; CHECK-NEXT: [[CMOV64rr:%[0-9]+]]:gr64 = CMOV64rr [[SUBREG_TO_REG]], [[COPY]], 8, implicit $eflags
170 ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[CMOV64rr]] :: (store (s64) into %ir.0)
171 ; CHECK-NEXT: $rax = COPY [[MOV64rm]]
172 ; CHECK-NEXT: RET 0, $rax
175 %4:gr64 = MOV64rm %0, 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
176 %5:gr32 = COPY %4.sub_32bit
177 %6:gr32 = AND32ri8 %5, 3, implicit-def dead $eflags
178 %7:gr64 = SUBREG_TO_REG 0, killed %6, %subreg.sub_32bit
179 TEST64rr %7, %7, implicit-def $eflags
180 %8:gr64 = CMOV64rr %7, %1, 8, implicit $eflags
181 MOV64mr %0, 1, $noreg, 0, $noreg, killed %8 :: (store (s64) into %ir.0)
187 name: test_not_erased_when_eflags_change
189 tracksDebugUserValues: false
191 - { id: 0, class: gr64, preferred-register: '' }
192 - { id: 1, class: gr64, preferred-register: '' }
193 - { id: 2, class: gr64, preferred-register: '' }
194 - { id: 3, class: gr64, preferred-register: '' }
195 - { id: 4, class: gr64, preferred-register: '' }
196 - { id: 5, class: gr64, preferred-register: '' }
197 - { id: 6, class: gr32, preferred-register: '' }
198 - { id: 7, class: gr32, preferred-register: '' }
199 - { id: 8, class: gr64, preferred-register: '' }
200 - { id: 9, class: gr64, preferred-register: '' }
201 - { id: 10, class: gr64, preferred-register: '' }
203 - { reg: '$rdi', virtual-reg: '%0' }
204 - { reg: '$rsi', virtual-reg: '%1' }
205 - { reg: '$rcx', virtual-reg: '%3' }
206 - { reg: '$r8', virtual-reg: '%4' }
209 machineFunctionInfo: {}
212 liveins: $rdi, $rsi, $rcx, $r8
214 ; CHECK-LABEL: name: test_not_erased_when_eflags_change
215 ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $r8
216 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rcx
217 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr64 = COPY $rsi
218 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr64 = COPY $rdi
219 ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY3]], 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
220 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr32 = COPY [[MOV64rm]].sub_32bit
221 ; CHECK-NEXT: [[AND32ri8_:%[0-9]+]]:gr32 = AND32ri8 [[COPY4]], 3, implicit-def dead $eflags
222 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, killed [[AND32ri8_]], %subreg.sub_32bit
223 ; CHECK-NEXT: [[XOR64ri8_:%[0-9]+]]:gr64 = XOR64ri8 [[COPY1]], 5, implicit-def dead $eflags
224 ; CHECK-NEXT: TEST64rr [[SUBREG_TO_REG]], [[SUBREG_TO_REG]], implicit-def $eflags
225 ; CHECK-NEXT: [[CMOV64rr:%[0-9]+]]:gr64 = CMOV64rr [[SUBREG_TO_REG]], [[COPY2]], 4, implicit $eflags
226 ; CHECK-NEXT: MOV64mr [[COPY3]], 1, $noreg, 0, $noreg, killed [[CMOV64rr]] :: (store (s64) into %ir.0)
227 ; CHECK-NEXT: MOV64mr [[COPY]], 1, $noreg, 0, $noreg, killed [[XOR64ri8_]] :: (store (s64) into %ir.4)
233 %5:gr64 = MOV64rm %0, 1, $noreg, 0, $noreg :: (load (s64) from %ir.0)
234 %6:gr32 = COPY %5.sub_32bit
235 %7:gr32 = AND32ri8 %6, 3, implicit-def dead $eflags
236 %8:gr64 = SUBREG_TO_REG 0, killed %7, %subreg.sub_32bit
237 %9:gr64 = XOR64ri8 %3, 5, implicit-def dead $eflags
238 TEST64rr %8, %8, implicit-def $eflags
239 %10:gr64 = CMOV64rr %8, %1, 4, implicit $eflags
240 MOV64mr %0, 1, $noreg, 0, $noreg, killed %10 :: (store (s64) into %ir.0)
241 MOV64mr %4, 1, $noreg, 0, $noreg, killed %9 :: (store (s64) into %ir.4)
248 exposesReturnsTwice: false
250 regBankSelected: false
253 tracksRegLiveness: true
256 callsUnwindInit: false
262 failsVerification: false
263 tracksDebugUserValues: false
265 - { id: 0, class: gr32, preferred-register: '' }
266 - { id: 1, class: gr32, preferred-register: '' }
267 - { id: 2, class: gr64, preferred-register: '' }
268 - { id: 3, class: gr16, preferred-register: '' }
269 - { id: 4, class: gr16, preferred-register: '' }
270 - { id: 5, class: gr32, preferred-register: '' }
271 - { id: 6, class: gr32, preferred-register: '' }
272 - { id: 7, class: gr16, preferred-register: '' }
274 - { reg: '$edi', virtual-reg: '%0' }
275 - { reg: '$esi', virtual-reg: '%1' }
276 - { reg: '$rdx', virtual-reg: '%2' }
278 isFrameAddressTaken: false
279 isReturnAddressTaken: false
289 maxCallFrameSize: 4294967295
290 cvBytesOfCalleeSavedRegisters: 0
291 hasOpaqueSPAdjustment: false
293 hasMustTailInVarArgFunc: false
302 debugValueSubstitutions: []
304 machineFunctionInfo: {}
306 ; CHECK-LABEL: name: erase_test16
308 ; CHECK-NEXT: successors: %bb.1(0x60000000), %bb.3(0x20000000)
309 ; CHECK-NEXT: liveins: $edi, $esi, $rdx
311 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rdx
312 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
313 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr32 = COPY $edi
314 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr16 = COPY [[COPY2]].sub_16bit
315 ; CHECK-NEXT: TEST16rr [[COPY3]], [[COPY3]], implicit-def $eflags
316 ; CHECK-NEXT: JCC_1 %bb.3, 4, implicit $eflags
317 ; CHECK-NEXT: JMP_1 %bb.1
319 ; CHECK-NEXT: bb.1.entry:
320 ; CHECK-NEXT: successors: %bb.2(0x55555555), %bb.3(0x2aaaaaab)
322 ; CHECK-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[COPY1]], 123, implicit-def $eflags
323 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr16 = COPY [[AND32ri]].sub_16bit
324 ; CHECK-NEXT: JCC_1 %bb.3, 5, implicit $eflags
325 ; CHECK-NEXT: JMP_1 %bb.2
327 ; CHECK-NEXT: bb.2.if.then:
328 ; CHECK-NEXT: successors: %bb.3(0x80000000)
330 ; CHECK-NEXT: MOV16mr [[COPY]], 1, $noreg, 0, $noreg, [[COPY3]] :: (store (s16) into %ir.2, align 4)
332 ; CHECK-NEXT: bb.3.if.end:
333 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
334 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gr16 = COPY [[MOV32r0_]].sub_16bit
335 ; CHECK-NEXT: $ax = COPY [[COPY5]]
336 ; CHECK-NEXT: RET 0, $ax
338 successors: %bb.3(0x60000000), %bb.2(0x20000000)
339 liveins: $edi, $esi, $rdx
344 %3:gr16 = COPY %0.sub_16bit
345 TEST16rr %3, %3, implicit-def $eflags
346 JCC_1 %bb.2, 4, implicit $eflags
350 successors: %bb.1(0x55555555), %bb.2(0x2aaaaaab)
352 %5:gr32 = AND32ri %1, 123, implicit-def dead $eflags
353 %4:gr16 = COPY %5.sub_16bit
354 TEST16rr %4, %4, implicit-def $eflags
355 JCC_1 %bb.2, 5, implicit $eflags
359 successors: %bb.2(0x80000000)
361 MOV16mr %2, 1, $noreg, 0, $noreg, %3 :: (store (s16) into %ir.2, align 4)
364 %6:gr32 = MOV32r0 implicit-def dead $eflags
365 %7:gr16 = COPY %6.sub_16bit
371 name: erase_test16_bigimm
373 exposesReturnsTwice: false
375 regBankSelected: false
378 tracksRegLiveness: true
381 callsUnwindInit: false
387 failsVerification: false
388 tracksDebugUserValues: false
390 - { id: 0, class: gr32, preferred-register: '' }
391 - { id: 1, class: gr32, preferred-register: '' }
392 - { id: 2, class: gr32, preferred-register: '' }
393 - { id: 3, class: gr64, preferred-register: '' }
394 - { id: 4, class: gr16, preferred-register: '' }
395 - { id: 5, class: gr16, preferred-register: '' }
396 - { id: 6, class: gr32, preferred-register: '' }
397 - { id: 7, class: gr16, preferred-register: '' }
399 - { reg: '$edi', virtual-reg: '%1' }
400 - { reg: '$esi', virtual-reg: '%2' }
401 - { reg: '$rdx', virtual-reg: '%3' }
403 isFrameAddressTaken: false
404 isReturnAddressTaken: false
414 maxCallFrameSize: 4294967295
415 cvBytesOfCalleeSavedRegisters: 0
416 hasOpaqueSPAdjustment: false
418 hasMustTailInVarArgFunc: false
427 debugValueSubstitutions: []
429 machineFunctionInfo: {}
431 ; CHECK-LABEL: name: erase_test16_bigimm
433 ; CHECK-NEXT: successors: %bb.1(0x60000000), %bb.3(0x20000000)
434 ; CHECK-NEXT: liveins: $edi, $esi, $rdx
436 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rdx
437 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
438 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr32 = COPY $edi
439 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr16 = COPY [[COPY2]].sub_16bit
440 ; CHECK-NEXT: TEST16rr [[COPY3]], [[COPY3]], implicit-def $eflags
441 ; CHECK-NEXT: JCC_1 %bb.3, 4, implicit $eflags
442 ; CHECK-NEXT: JMP_1 %bb.1
444 ; CHECK-NEXT: bb.1.entry:
445 ; CHECK-NEXT: successors: %bb.2(0x55555555), %bb.3(0x2aaaaaab)
447 ; CHECK-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[COPY1]], 123456, implicit-def dead $eflags
448 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr16 = COPY [[AND32ri]].sub_16bit
449 ; CHECK-NEXT: TEST16rr [[COPY4]], [[COPY4]], implicit-def $eflags
450 ; CHECK-NEXT: JCC_1 %bb.3, 5, implicit $eflags
451 ; CHECK-NEXT: JMP_1 %bb.2
453 ; CHECK-NEXT: bb.2.if.then:
454 ; CHECK-NEXT: successors: %bb.3(0x80000000)
456 ; CHECK-NEXT: MOV32mr [[COPY]], 1, $noreg, 0, $noreg, [[AND32ri]] :: (store (s32) into %ir.2)
458 ; CHECK-NEXT: bb.3.if.end:
459 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
460 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gr16 = COPY [[MOV32r0_]].sub_16bit
461 ; CHECK-NEXT: $ax = COPY [[COPY5]]
462 ; CHECK-NEXT: RET 0, $ax
464 successors: %bb.3(0x60000000), %bb.2(0x20000000)
465 liveins: $edi, $esi, $rdx
470 %5:gr16 = COPY %1.sub_16bit
471 TEST16rr %5, %5, implicit-def $eflags
472 JCC_1 %bb.2, 4, implicit $eflags
476 successors: %bb.1(0x55555555), %bb.2(0x2aaaaaab)
478 %0:gr32 = AND32ri %2, 123456, implicit-def dead $eflags
479 %4:gr16 = COPY %0.sub_16bit
480 TEST16rr %4, %4, implicit-def $eflags
481 JCC_1 %bb.2, 5, implicit $eflags
485 successors: %bb.2(0x80000000)
487 MOV32mr %3, 1, $noreg, 0, $noreg, %0 :: (store (s32) into %ir.2)
490 %6:gr32 = MOV32r0 implicit-def dead $eflags
491 %7:gr16 = COPY %6.sub_16bit
497 name: erase_test16_sf
499 exposesReturnsTwice: false
501 regBankSelected: false
504 tracksRegLiveness: true
507 callsUnwindInit: false
513 failsVerification: false
514 tracksDebugUserValues: false
516 - { id: 0, class: gr16, preferred-register: '' }
517 - { id: 1, class: gr32, preferred-register: '' }
518 - { id: 2, class: gr32, preferred-register: '' }
519 - { id: 3, class: gr64, preferred-register: '' }
520 - { id: 4, class: gr16, preferred-register: '' }
521 - { id: 5, class: gr32, preferred-register: '' }
522 - { id: 6, class: gr32, preferred-register: '' }
523 - { id: 7, class: gr16, preferred-register: '' }
525 - { reg: '$edi', virtual-reg: '%1' }
526 - { reg: '$esi', virtual-reg: '%2' }
527 - { reg: '$rdx', virtual-reg: '%3' }
529 isFrameAddressTaken: false
530 isReturnAddressTaken: false
540 maxCallFrameSize: 4294967295
541 cvBytesOfCalleeSavedRegisters: 0
542 hasOpaqueSPAdjustment: false
544 hasMustTailInVarArgFunc: false
553 debugValueSubstitutions: []
555 machineFunctionInfo: {}
557 ; CHECK-LABEL: name: erase_test16_sf
559 ; CHECK-NEXT: successors: %bb.1(0x60000000), %bb.3(0x20000000)
560 ; CHECK-NEXT: liveins: $edi, $esi, $rdx
562 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rdx
563 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr32 = COPY $esi
564 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr32 = COPY $edi
565 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr16 = COPY [[COPY2]].sub_16bit
566 ; CHECK-NEXT: TEST16rr [[COPY3]], [[COPY3]], implicit-def $eflags
567 ; CHECK-NEXT: JCC_1 %bb.3, 4, implicit $eflags
568 ; CHECK-NEXT: JMP_1 %bb.1
570 ; CHECK-NEXT: bb.1.entry:
571 ; CHECK-NEXT: successors: %bb.2(0x55555555), %bb.3(0x2aaaaaab)
573 ; CHECK-NEXT: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[COPY1]], 1234, implicit-def dead $eflags
574 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr16 = COPY [[AND32ri]].sub_16bit
575 ; CHECK-NEXT: TEST16rr [[COPY4]], [[COPY4]], implicit-def $eflags
576 ; CHECK-NEXT: JCC_1 %bb.3, 9, implicit $eflags
577 ; CHECK-NEXT: JMP_1 %bb.2
579 ; CHECK-NEXT: bb.2.if.then:
580 ; CHECK-NEXT: successors: %bb.3(0x80000000)
582 ; CHECK-NEXT: MOV16mr [[COPY]], 1, $noreg, 0, $noreg, [[COPY4]] :: (store (s16) into %ir.2, align 4)
584 ; CHECK-NEXT: bb.3.if.end:
585 ; CHECK-NEXT: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
586 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gr16 = COPY [[MOV32r0_]].sub_16bit
587 ; CHECK-NEXT: $ax = COPY [[COPY5]]
588 ; CHECK-NEXT: RET 0, $ax
590 successors: %bb.3(0x60000000), %bb.2(0x20000000)
591 liveins: $edi, $esi, $rdx
596 %4:gr16 = COPY %1.sub_16bit
597 TEST16rr %4, %4, implicit-def $eflags
598 JCC_1 %bb.2, 4, implicit $eflags
602 successors: %bb.1(0x55555555), %bb.2(0x2aaaaaab)
604 %5:gr32 = AND32ri %2, 1234, implicit-def dead $eflags
605 %0:gr16 = COPY %5.sub_16bit
606 TEST16rr %0, %0, implicit-def $eflags
607 JCC_1 %bb.2, 9, implicit $eflags
611 successors: %bb.2(0x80000000)
613 MOV16mr %3, 1, $noreg, 0, $noreg, %0 :: (store (s16) into %ir.2, align 4)
616 %6:gr32 = MOV32r0 implicit-def dead $eflags
617 %7:gr16 = COPY %6.sub_16bit