<html>
<head>
<base href="http://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 --- - missed optimization: recognize square root squared"
href="http://llvm.org/bugs/show_bug.cgi?id=21126">21126</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>missed optimization: recognize square root squared
</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>All
</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>spatel+llvm@rotateright.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>It seems silly, but this actually happens in the real world...for example, in
code that does x ** 3/2 like:
<a href="http://benchmarksgame.alioth.debian.org/u32/program.php?test=nbody&lang=gcc&id=1">http://benchmarksgame.alioth.debian.org/u32/program.php?test=nbody&lang=gcc&id=1</a>
This should just return 'f':
$ cat sqrt_squared.ll
define double @foo(double %f) #0 {
%sqrt = tail call double @llvm.sqrt.f64(double %f)
%mul = fmul fast double %sqrt, %sqrt
ret double %mul
}
; Function Attrs: nounwind readnone
declare double @llvm.sqrt.f64(double) #1
attributes #0 = { "unsafe-fp-math"="true" }
attributes #1 = { nounwind readnone</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>