aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-26 05:25:00 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-26 05:25:00 +0000
commit1be1284fe658f4b8078eb5f8b5b0074e60d972cd (patch)
tree61dc33e689ab777a86149dbf9b9801848fb3a18f /lib/Transforms
parentda91f49751b9b55a41d315b9fbdbb14614587b03 (diff)
For 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 0105128693..586c7b1fb1 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -5858,7 +5858,7 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
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));
}