[llvm-commits] [llvm] r77407 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/sse41.ll

Eli Friedman eli.friedman at gmail.com
Tue Jul 28 19:19:26 PDT 2009


On Tue, Jul 28, 2009 at 7:04 PM, Eric Christopher<echristo at apple.com> wrote:
> where we should be able to get rid of the extra (bonus!) setcc that
> we've got in the generated code (cruft removed):
>
> _foo:
>        ptest   %xmm1, %xmm0
>        sete    %al
>        movzbl  %al, %eax
>        testl   %eax, %eax
>        sete    %al
>        movzbl  %al, %eax
>        leal    4(,%eax,4), %eax
>        ret

The reason we don't optimize this already is that the normal setcc
optimization doesn't handle the x86-specific nodes; it wouldn't be
very hard to add an x86-specific dagcombine to handle this case,
though.

-Eli




More information about the llvm-commits mailing list