1 # RUN: llc -mtriple=i386-unknown-linux-gnu -mcpu=slm -run-pass post-RA-sched -o - %s | FileCheck %s
3 # Verify that the critical antidependence breaker does not consider
4 # a high byte register as available as a replacement register
5 # in a certain context.
8 define void @main() { ret void }
14 tracksRegLiveness: true
18 - { id: 0, type: spill-slot, offset: -20, size: 4, alignment: 4, callee-saved-register: '$esi' }
19 - { id: 1, type: spill-slot, offset: -16, size: 4, alignment: 4, callee-saved-register: '$edi' }
20 - { id: 2, type: spill-slot, offset: -12, size: 4, alignment: 4, callee-saved-register: '$ebx' }
21 - { id: 3, type: spill-slot, offset: -8, size: 4, alignment: 4, callee-saved-register: '$ebp' }
23 - { id: 0, type: spill-slot, offset: -53, size: 1, alignment: 1 }
24 - { id: 1, type: spill-slot, offset: -48, size: 4, alignment: 4 }
25 - { id: 2, type: spill-slot, offset: -32, size: 4, alignment: 4 }
28 liveins: $ebp, $ebx, $edi, $esi
30 frame-setup PUSH32r killed $ebp, implicit-def $esp, implicit $esp
31 frame-setup PUSH32r killed $ebx, implicit-def $esp, implicit $esp
32 frame-setup PUSH32r killed $edi, implicit-def $esp, implicit $esp
33 frame-setup PUSH32r killed $esi, implicit-def $esp, implicit $esp
34 $esp = frame-setup SUB32ri8 $esp, 36, implicit-def dead $eflags
43 liveins: $eax, $ebp, $ebx, $ecx, $edi, $edx
45 $ebp = SHR32rCL killed $ebp, implicit-def dead $eflags, implicit $cl
46 $ebp = XOR32rr killed $ebp, killed $ebx, implicit-def dead $eflags
47 TEST32rr $edx, $edx, implicit-def $eflags
48 $cl = SETCCr 5, implicit $eflags
49 ; This %bl def is antidependent on the above use of $ebx
50 $bl = MOV8rm $esp, 1, $noreg, 3, _ ; :: (load 1 from %stack.0)
51 $cl = OR8rr killed $cl, $bl, implicit-def dead $eflags
52 $esi = MOVZX32rr8 killed $cl
53 $esi = ADD32rr killed $esi, killed $edi, implicit-def dead $eflags
54 $ecx = MOV32rm $esp, 1, $noreg, 24, _ ; :: (load 4 from %stack.2)
55 $edx = SAR32rCL killed $edx, implicit-def dead $eflags, implicit $cl
56 TEST32rr killed $edx, $edx, implicit-def $eflags
57 $cl = SETCCr 5, implicit $eflags
58 ; Verify that removal of the $bl antidependence does not use $ch
59 ; as a replacement register.
60 ; CHECK: $cl = AND8rr killed $cl, killed $b
61 $cl = AND8rr killed $cl, killed $bl, implicit-def dead $eflags
62 CMP32ri8 $ebp, -1, implicit-def $eflags
64 JCC_1 %bb.3, 4, implicit $eflags
67 liveins: $cl, $eax, $ebp, $esi
69 OR32mr $esp, 1, $noreg, 8, $noreg, killed $eax, implicit-def $eflags ; :: (store 4 into %stack.1)
70 $dl = SETCCr 5, implicit $eflags, implicit-def $edx
73 liveins: $cl, $ebp, $edx, $esi
75 $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags
76 $esp = ADD32ri8 $esp, 36, implicit-def dead $eflags
77 $esi = POP32r implicit-def $esp, implicit $esp
78 $edi = POP32r implicit-def $esp, implicit $esp
79 $ebx = POP32r implicit-def $esp, implicit $esp
80 $ebp = POP32r implicit-def $esp, implicit $esp