[LLVMbugs] [Bug 19356] New: builtin cabs(z) resp. hypot(z) squared should be optimized
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 7 10:19:50 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19356
Bug ID: 19356
Summary: builtin cabs(z) resp. hypot(z) squared should be
optimized
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: mrmocool at gmx.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
#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>), at 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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140407/bc78e612/attachment.html>
More information about the llvm-bugs
mailing list