[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

John McCall rjmccall at apple.com
Tue Jul 28 22:20:57 PDT 2009


Eric Christopher wrote:
> _foo:
> 	ptest 	%xmm1, %xmm0
> 	sete	%al
> 	movzbl	%al, %eax
> 	testl	%eax, %eax
> 	sete	%al
> 	movzbl	%al, %eax
> 	leal	4(,%eax,4), %eax
> 	ret
>
> Honestly it's the movzbl instructions that irritate me the most, but  
> there's no setcc that will set an entire register :(
>   

I'm just a naive front-end guy, but shouldn't we be optimizing
    movzbl %al, %eax
    testl %eax, %eax
into
    testb %al, %al
?

John.



More information about the llvm-commits mailing list