aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/ConstantFold.cpp
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
commit3e5d1d8d0839e98ee203aa3e3c4fe84ef71eba2c (patch)
tree4c7c0238edfcc1cfb8af636e3ee7b5fa55b05a35 /lib/VMCore/ConstantFold.cpp
parent0e4b6c7551776a801fa3caf9e05f47b5c8e001dc (diff)
downloadexternal_llvm-3e5d1d8d0839e98ee203aa3e3c4fe84ef71eba2c.zip
external_llvm-3e5d1d8d0839e98ee203aa3e3c4fe84ef71eba2c.tar.gz
external_llvm-3e5d1d8d0839e98ee203aa3e3c4fe84ef71eba2c.tar.bz2
hopefully resolve PR2240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r--lib/VMCore/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index 50fbe1a..9f31bcd 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/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.