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: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs