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

Reid Spencer reid at x10sys.com
Sun Mar 25 22:25:29 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.691 -> 1.692
---
Log message:

For PR1271: http://llvm.org/PR1271 :
Fix SingleSource/Regression/C/2003-05-21-UnionBitFields.c by changing a
getHighBitsSet call to getLowBitsSet call that was incorrectly converted
from the original lshr constant expression.


---
Diffs of the changes:  (+1 -1)

 InstructionCombining.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.691 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.692
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.691	Sun Mar 25 16:11:44 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Mon Mar 26 00:25:00 2007
@@ -5858,7 +5858,7 @@
           BinaryOperator::createLShr(X, ConstantInt::get(Ty, ShiftDiff));
         InsertNewInstBefore(Shift, I);
         
-        APInt Mask(APInt::getHighBitsSet(TypeBits, TypeBits - ShiftAmt2));
+        APInt Mask(APInt::getLowBitsSet(TypeBits, ShiftAmt2));
         return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask));
       }
       






More information about the llvm-commits mailing list