https://bugs.llvm.org/show_bug.cgi?id=45774
Bug ID: 45774
Summary: Failure to optimize followed xors into seperate xors
to avoid mov
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: gabrav...@gmail.com
CC: llvm-bugs@lists.llvm.org
int f(int x, int y, int c)
{
return (x - y - c) ^ x ^ y;
}
With -O3, GCC outputs this :
f:
mov eax, edi
xor edi, esi
sub eax, esi
sub eax, edx
xor eax, edi
ret
Clang outputs this :
f:
mov eax, esi
mov ecx, edi
sub ecx, esi
sub ecx, edx
xor eax, edi
xor eax, ecx
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
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs