https://bugs.llvm.org/show_bug.cgi?id=43433
Bug ID: 43433
Summary: "Virtual register defs don't dominate all uses" error
from dead-mi-elim
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: jesper.antons...@ericsson.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org
Created attachment 22564
--> https://bugs.llvm.org/attachment.cgi?id=22564&action=edit
minimized reproducer for ARM
We start off with:
bb.0:
$r0 = MOVi32imm 0
undef %0.gsub_0 = COPY $r0
bb.1:
liveins: $r0
%0.gsub_0 = ADDrr %0.gsub_0, $r0, 14, $noreg, $noreg
%0.gsub_1 = COPY $r0
Reproduce with:
llc -verify-machineinstrs -mtriple=arm -o - virtreg.mir
-run-pass=dead-mi-elimination
and get:
bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
$r0 = MOVi32imm 0
bb.1:
; predecessors: %bb.0
liveins: $r0
%0.gsub_1:gprpair = COPY $r0
# End machine code for function f.
*** Bad machine code: Virtual register defs don't dominate all uses. ***
- function: f
- v. register: %0
So, gsub_0 writes are removed even though that leaves the gsub_1 write hanging
(a subreg write is a read of the rest of the register).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs