https://bugs.llvm.org/show_bug.cgi?id=45755
Bug ID: 45755
Summary: Failure to recognize andn-like pattern
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]
int f(int x)
{
return ~(x | -x);
}
With -O3, GCC outputs this :
f(int):
lea eax, [rdi-1]
andn eax, edi, eax
ret
LLVM outputs this :
f(int): # @f(int)
mov eax, edi
neg eax
or eax, edi
not eax
ret
--
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