[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner clattner at apple.com
Sat Mar 24 15:53:29 PDT 2007


> @@ -4373,9 +4374,10 @@
>
>    // See if we can simplify any instructions used by the  
> instruction whose sole
>    // purpose is to compute bits we don't care about.
> -  uint64_t KnownZero, KnownOne;
> +  uint32_t BitWidth = cast<IntegerType>(I.getType())->getBitWidth();

This is an important regression for vectors.  And/Or/Xor do apply to  
VectorType and Integer types.  Please fix ASAP, by moving this into  
the !isa<vectorType> clause.

> +  APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0);
>    if (!isa<VectorType>(I.getType()) &&
> -      SimplifyDemandedBits(&I, cast<IntegerType>(I.getType())- 
> >getBitMask(),
> +      SimplifyDemandedBits(&I, APInt::getAllOnesValue(BitWidth),
>                             KnownZero, KnownOne))
>      return &I;
>

-Chris




More information about the llvm-commits mailing list