http://llvm.org/bugs/show_bug.cgi?id=8785
Summary: Suboptimal for logical test -> 0/1 with width > 8bit.
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Test program:
int testf(int f)
{
return f != 0;
}
Resulting assembler:
testl %edi, %edi
setne %al
movzbl %al, %eax
More compact assembler:
xorl %eax, %eax
testl %edi, %edi
setne %al
This saves one byte and may result in better scheduling.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs