<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - "Virtual register defs don't dominate all uses" error from dead-mi-elim"
href="https://bugs.llvm.org/show_bug.cgi?id=43433">43433</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"Virtual register defs don't dominate all uses" error from dead-mi-elim
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jesper.antonsson@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22564" name="attach_22564" title="minimized reproducer for ARM">attachment 22564</a> <a href="attachment.cgi?id=22564&action=edit" title="minimized reproducer for ARM">[details]</a></span>
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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>