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

Chris Lattner clattner at apple.com
Wed Jun 6 10:49:54 PDT 2007


>
> Fix PR1499: http://llvm.org/PR1499 .

Very nice, thanks again Lauro!

-Chris

>
> ---
> Diffs of the changes:  (+4 -0)
>
>  InstructionCombining.cpp |    4 ++++
>  1 files changed, 4 insertions(+)
>
>
> Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
> diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.768  
> llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.769
> --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.768	Tue  
> May 22 20:17:04 2007
> +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Wed Jun  6  
> 12:08:48 2007
> @@ -1346,6 +1346,10 @@
>
>        // Signed shift right.
>        APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt));
> +      // If any of the "high bits" are demanded, we should set the  
> sign bit as
> +      // demanded.
> +      if (DemandedMask.countLeadingZeros() <= ShiftAmt)
> +        DemandedMaskIn.set(BitWidth-1);
>        if (SimplifyDemandedBits(I->getOperand(0),
>                                 DemandedMaskIn,
>                                 RHSKnownZero, RHSKnownOne, Depth+1))
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list