Skip to content

Commit 49cb25a

Browse files
committed
Precommit test
1 parent cdedc81 commit 49cb25a

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

llvm/test/CodeGen/X86/rematerialize-sub-super-reg.mir

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,27 @@ body: |
165165
bb.3:
166166
$rax = COPY %t3
167167
RET 0, $rax
168-
169168
...
169+
---
170+
; FIXME: `$al = COPY killed %4` should rematerialize as `dead $eax = MOV32r0 ... implicit-def $al`
171+
; not `dead $eax = MOV32r0 ... implicit-def $rax` (as the full $rax is not used).
172+
name: rematerialize_superregister_into_subregister_def_with_impdef_physreg
173+
body: |
174+
bb.0.entry:
175+
; CHECK-LABEL: name: rematerialize_superregister_into_subregister_def_with_impdef_physreg
176+
; CHECK: dead $esi = MOV32r0 implicit-def dead $eflags, implicit-def $rsi
177+
; CHECK-NEXT: dead $edx = MOV32r0 implicit-def dead $eflags, implicit-def $rdx
178+
; CHECK-NEXT: FAKE_USE implicit killed $rsi, implicit killed $rdx
179+
; CHECK-NEXT: dead $eax = MOV32r0 implicit-def dead $eflags, implicit-def $rax
180+
; CHECK-NEXT: FAKE_USE implicit killed $al
181+
; CHECK-NEXT: $eax = MOV32r0 implicit-def dead $eflags
182+
; CHECK-NEXT: RET 0, $eax
183+
undef %1.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags, implicit-def %1
184+
$rsi = COPY %1
185+
$rdx = COPY %1
186+
FAKE_USE implicit killed $rsi, implicit killed $rdx
187+
%4:gr8 = COPY killed %1.sub_8bit
188+
$al = COPY killed %4
189+
FAKE_USE implicit killed $al
190+
$eax = MOV32r0 implicit-def dead $eflags
191+
RET 0, killed $eax

0 commit comments

Comments
 (0)