<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 - LLVM ERROR: Use not jointly dominated by defs. after simple-register-coalescing"
href="https://bugs.llvm.org/show_bug.cgi?id=38898">38898</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM ERROR: Use not jointly dominated by defs. after simple-register-coalescing
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>mikael.holmen@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20864" name="attach_20864" title="reproducer">attachment 20864</a> <a href="attachment.cgi?id=20864&action=edit" title="reproducer">[details]</a></span>
reproducer
Reproduce with
llc -o - coalesce.mir -march=amdgcn -run-pass simple-register-coalescing
-verify-machineinstrs
which gives
Use of $noreg does not have a corresponding definition on every path:
48r %2.sub0:sreg_64 = IMPLICIT_DEF
LLVM ERROR: Use not jointly dominated by defs.
-debug shows
...
0B bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
16B %0:sreg_32 = IMPLICIT_DEF
32B %1:sreg_32 = IMPLICIT_DEF
48B undef %2.sub0:sreg_64 = IMPLICIT_DEF
64B %2.sub1:sreg_64 = COPY %1:sreg_32
...
...
64B %2.sub1:sreg_64 = COPY %1:sreg_32
Considering merging to SReg_64 with %1 in %2:sub1
RHS = %1 [32r,64r:0) 0@32r weight:0.000000e+00
LHS = %2
[16r,48r:1)[48r,64r:2)[64r,80B:4)[80B,112B:6)[128r,144r:0)[144r,176B:3)[176B,240r:5)
0@128r 1@16r 2@48r 3@144r 4@64r 5@176B-phi 6@80B-phi L00000001
[48r,80B:1)[80B,112B:3)[128r,176B:0)[176B,224r:2) 0@128r 1@48r 2@176B-phi
3@80B-phi L00000002 [64r,80B:2)[80B,112B:4)[144r,176B:0)[176B,240r:3) 0@144r
1@x 2@64r 3@176B-phi 4@80B-phi weight:0.000000e+00
...
erased: 16r undef %2.sub1:sreg_64 = IMPLICIT_DEF
erased: 64r %2.sub1:sreg_64 = COPY %1:sreg_32
erased: 32r %1:sreg_32 = IMPLICIT_DEF
...
So we end up with this bb.0:
0B bb.0:
successors: %bb.1(0x80000000); %bb.1(100.00%)
48B %2.sub0:sreg_64 = IMPLICIT_DEF
Originally found when compiling for an out-of-tree target.
Thanks to Matthias Braun for the above AMDGPU reproducer.</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>