<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Misc incorrect folds with fabs"
href="https://llvm.org/bugs/show_bug.cgi?id=31702">31702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Misc incorrect folds with fabs
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>efriedma@codeaurora.org
</td>
</tr>
<tr>
<th>CC</th>
<td>justin.lebar@gmail.com, llvm-bugs@lists.llvm.org, Matthew.Arsenault@amd.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Testcase (opt -instcombine):
define double @f1(double %x) local_unnamed_addr #0 {
entry:
%call = tail call double @llvm.fabs.f64(double %x)
%add = fadd double %call, 0x7FF8000000000000
%abs = tail call double @llvm.fabs.f64(double %add)
ret double %abs
}
define double @f2(double %x) local_unnamed_addr #1 {
entry:
%call1 = tail call double @llvm.maxnum.f64(double 0x7FF8000000000000, double
%x)
%call2 = tail call double @llvm.fabs.f64(double %call1)
ret double %call1
}
define double @f3(double %x, i32 %n) local_unnamed_addr #1 {
entry:
%call1 = tail call double @llvm.powi.f64(double -0.0, i32 %n)
%call2 = tail call double @llvm.fabs.f64(double %call1)
ret double %call1
}
declare double @llvm.maxnum.f64(double, double)
declare double @llvm.fabs.f64(double)
declare double @llvm.powi.f64(double, i32)
instcombine eliminates fabs calls from all of these, so the sign bit could be
wrong. I think a few others are wrong too.
See <a href="https://reviews.llvm.org/D28927">https://reviews.llvm.org/D28927</a>.</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>