[llvm-bugs] [Bug 38458] New: -sin(-x) -> sin(x)
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 6 04:08:12 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38458
Bug ID: 38458
Summary: -sin(-x) -> sin(x)
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: llvm-bugs at lists.llvm.org
-sin(-x) can be simplified to sin(x)
double sinrev(double x)
{
return -sin(-x);
}
Current code gen:
sinrev(double):
push rax
xorps xmm0, xmmword ptr [rip + .LCPI0_0]
call sin
xorps xmm0, xmmword ptr [rip + .LCPI0_0]
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/20180806/2ec39108/attachment.html>
More information about the llvm-bugs
mailing list