[llvm-bugs] [Bug 49179] New: Missing copysign(1., x) < 0. to std::signbit(x) fold
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Feb 14 12:12:53 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49179
Bug ID: 49179
Summary: Missing copysign(1., x) < 0. to std::signbit(x) fold
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: nok.raven at gmail.com
CC: llvm-bugs at lists.llvm.org
#include <cmath>
bool foo(double x)
{
return std::copysign(1., x) < 0.;
}
bool bar(double x)
{
return std::signbit(x);
}
https://godbolt.org/z/xPMzj9
--
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/20210214/062c3c09/attachment.html>
More information about the llvm-bugs
mailing list