[llvm-commits] [llvm] r65747 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/PowerPC/PPCISelLowering.cpp

Bob Wilson bob.wilson at apple.com
Sat Feb 28 20:21:57 PST 2009


On Feb 28, 2009, at 6:33 PM, Chris Lattner wrote:
> This should indicate what happens with vectors that have more than 32
> elements (which is #bits in SplatUndef etc).  Should this always
> return false?  What happens when the element is greater than 32-bits,
> e.g. <2 x i64> ?
>
> Perhaps it would be best to change the interface to take APInts by  
> ref.
>
>> +// If this is a splat (repetition) of a value across the whole
>> vector, return
>> +// the smallest size that splats it.  For example,
>> "0x01010101010101..." is a
>> +// splat of 0x01, 0x0101, and 0x01010101.  We return SplatBits =
>> 0x01 and
>> +// SplatSize = 1 byte.
>> +bool BuildVectorSDNode::isConstantSplat(unsigned &SplatBits,
>> +                                        unsigned &SplatUndef,
>> +                                        unsigned &SplatSize,
>> +                                        bool &HasAnyUndefs) {
>> +  uint64_t Bits128[2];
>> +  uint64_t Undef128[2];
>
> Ok, this is really specific to 128-bit vectors.  Do you plan to
> generalize this?

Yes.  Scott had generalized it in some ways, and I had patched my  
local copy of his code to handle vectors of any size.  I'm planning to  
get back to that point.  But, in light on the PPC regression that Evan  
reported, I thought it best to proceed in stages so it will be easier  
to figure out what is breaking.

This patch just moved the existing PPC code.  I'll continue with  
further changes soon.  Thanks for your suggestions!




More information about the llvm-commits mailing list