Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
from _foo: movl $99, %ecx movl 4(%esp), %eax subl %eax, %ecx xorl %edx, %edx testl %ecx, %ecx cmovs %edx, %eax ret to _foo: xorl %ecx, %ecx movl 4(%esp), %eax cmpl $99, %eax cmovg %ecx, %eax ret llvm-svn: 45173
Loading
Please register or sign in to comment