summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit50898607a9e143042f2a5b6917196eec4dd867b7 (patch)
tree9b53ed4caf9d60eb2267e95f57582e1905e1fe2f /llvm/lib
parente5866e7b897712580bae1fc3681065b7f5b544ca (diff)
downloadbcm5719-llvm-50898607a9e143042f2a5b6917196eec4dd867b7.tar.gz
bcm5719-llvm-50898607a9e143042f2a5b6917196eec4dd867b7.zip
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. llvm-svn: 35348
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 01051286934..586c7b1fb10 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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));
}
OpenPOWER on IntegriCloud