[llvm-bugs] [Bug 47064] New: Failure to optimize multiplication by copysign to abs
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Aug 9 12:04:25 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47064
Bug ID: 47064
Summary: Failure to optimize multiplication by copysign to abs
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
float f(float x)
{
return x * copysignf(1.0f, x);
}
This can be optimized to `fabsf(x);`. This transformation is done by GCC, but
not by LLVM. Similar transformations can also be done, such as `x *
copysignf(1.0f, -x)` -> `-fabsf(x)`, and are done by GCC, but not by LLVM.
--
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/20200809/fdbad4cd/attachment.html>
More information about the llvm-bugs
mailing list