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: [email protected]
Reporter: [email protected]
CC: [email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs