summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-20 19:59:12 +0000
committerChris Lattner <sabre@nondot.org>2008-04-20 19:59:12 +0000
commit912bec79ca9bfc4e27634248fbb84257ee2b772b (patch)
tree146ed377daccd00be6d93c34d0b1b42de47e615f
parent14cd1ee95f4bec33199857fd355373c474da795c (diff)
downloadbcm5719-llvm-912bec79ca9bfc4e27634248fbb84257ee2b772b.tar.gz
bcm5719-llvm-912bec79ca9bfc4e27634248fbb84257ee2b772b.zip
hopefully resolve PR2240
llvm-svn: 49999
-rw-r--r--llvm/lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 50fbe1a00c4..9f31bcdb75f 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -571,7 +571,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
if (GVAlign > 1) {
unsigned DstWidth = CI2->getType()->getBitWidth();
- unsigned SrcWidth = std::min(SrcWidth, Log2_32(GVAlign));
+ unsigned SrcWidth = std::min(DstWidth, Log2_32(GVAlign));
APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
// If checking bits we know are clear, return zero.
OpenPOWER on IntegriCloud