[llvm-commits] [llvm] r51472 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll

Nick Lewycky nicholas at mxc.ca
Thu May 22 21:30:22 PDT 2008


Chris Lattner wrote:
> On May 22, 2008, at 9:14 PM, Nick Lewycky wrote:
> 
>> Author: nicholas
>> Date: Thu May 22 23:14:51 2008
>> New Revision: 51472
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=51472&view=rev
>> Log:
>> Implement X + X for vectors.
> 
> Is the code generator turning this back into x+x?  If not, this is a  
> major pessimization.  What does:
> 
> define <4 x i32> @f(<4 x i32> %i) nounwind {
>    %A = add <4 x i32> %i, %i
>    ret <4 x i32> %A
> }
> 
> compile into?  Without your patch I get:
> 
> _f:
> 	paddd	%xmm0, %xmm0
> 	ret

Good grief. I don't even want to paste what it turns into.

I'll revert the patch and move it to a README, I guess.

Nick



More information about the llvm-commits mailing list