<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 --- - builtin cabs(z) resp. hypot(z) squared should be optimized"
href="http://llvm.org/bugs/show_bug.cgi?id=19356">19356</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>builtin cabs(z) resp. hypot(z) squared should be optimized
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mrmocool@gmx.de
</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>#include <complex>
float abs2(std::complex<float> c)
{
return abs(c) * abs(c);
}
$ clang++ -mllvm --x86-asm-syntax=intel -std=c++11 -O3 -g -ffast-math -S
test.cpp
.type bar(std::complex<float>),@function
bar(std::complex<float>): # @bar(std::complex<float>)
.Lfunc_begin0:
# BB#0: # %entry
.loc 3 584 0 prologue_end # /usr/include/c++/4.8/complex:584:0
582:/usr/include/c++/4.8/complex **** #if _GLIBCXX_USE_C99_COMPLEX
583:/usr/include/c++/4.8/complex **** inline float
584:/usr/include/c++/4.8/complex **** __complex_abs(__complex__ float __z) {
return __builtin_cabsf(__z); }
push rax
.Ltmp0:
.cfi_def_cfa_offset 16
call cabsf
.Ltmp1:
.loc 1 4 18 # testcomplex.cpp:4:18
mulss xmm0, xmm0
pop rax
ret</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>