[llvm-commits] [llvm] r158175 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/iabs.ll
Joerg Sonnenberger
joerg at britannica.bec.de
Fri Jun 8 07:01:06 PDT 2012
On Thu, Jun 07, 2012 at 10:39:11PM -0000, Manman Ren wrote:
> Log:
> X86: optimize generated code for integer ABS
>
> This patch will generate the following for integer ABS:
> movl %edi, %eax
> negl %eax
> cmovll %edi, %eax
> INSTEAD OF
> movl %edi, %ecx
> sarl $31, %ecx
> leal (%rdi,%rcx), %eax
> xorl %ecx, %eax
Does this work correctly (e.g. not do the transform) on CPUs without
CMOV support?
Joerg
More information about the llvm-commits
mailing list