<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 - Infinite loop in -instcombine, ping-pong between fadd/fsub"
href="https://bugs.llvm.org/show_bug.cgi?id=37605">37605</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Infinite loop in -instcombine, ping-pong between fadd/fsub
</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=20344" name="attach_20344" title="reproducer">attachment 20344</a> <a href="attachment.cgi?id=20344&action=edit" title="reproducer">[details]</a></span>
reproducer
Reproduce with
opt -S -o - tr16071.ll -instcombine
With -debug we see
INSTCOMBINE ITERATION #1 on test
IC: DCE: %1 = select i1 %tobool, i1 true, i1 undef
IC: ADDING: 5 instrs to worklist
IC: Visiting: %0 = load i16, i16* @c, align 1
IC: Visiting: %conv = sitofp i16 %0 to float
IC: Visiting: %sub = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32)
to float)
IC: Old = %sub = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32) to
float)
New = <badref> = fadd float %conv, fsub (float -0.000000e+00, float
bitcast (i32 ptrtoint (i16* @b to i32) to float))
IC: ADD: %sub = fadd float %conv, fsub (float -0.000000e+00, float bitcast
(i32 ptrtoint (i16* @b to i32) to float))
IC: ERASE %1 = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32) to
float)
IC: ADD: %conv = sitofp i16 %0 to float
IC: Visiting: %conv = sitofp i16 %0 to float
IC: Visiting: %sub = fadd float %conv, fsub (float -0.000000e+00, float
bitcast (i32 ptrtoint (i16* @b to i32) to float))
IC: Old = %sub = fadd float %conv, fsub (float -0.000000e+00, float bitcast
(i32 ptrtoint (i16* @b to i32) to float))
New = <badref> = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32)
to float)
IC: ADD: %sub = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32) to
float)
IC: ERASE %1 = fadd float %conv, fsub (float -0.000000e+00, float bitcast
(i32 ptrtoint (i16* @b to i32) to float))
IC: ADD: %conv = sitofp i16 %0 to float
IC: Visiting: %conv = sitofp i16 %0 to float
IC: Visiting: %sub = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32)
to float)
IC: Old = %sub = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32) to
float)
New = <badref> = fadd float %conv, fsub (float -0.000000e+00, float
bitcast (i32 ptrtoint (i16* @b to i32) to float))
IC: ADD: %sub = fadd float %conv, fsub (float -0.000000e+00, float bitcast
(i32 ptrtoint (i16* @b to i32) to float))
IC: ERASE %1 = fsub float %conv, bitcast (i32 ptrtoint (i16* @b to i32) to
float)
IC: ADD: %conv = sitofp i16 %0 to float
[...]
this started happening after the commit:
"r330126 - [InstCombine] simplify fneg+fadd folds; NFC"</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>