hopefully resolve PR2240

llvm-svn: 49999
This commit is contained in:
Chris Lattner 2008-04-20 19:59:12 +00:00
parent 14cd1ee95f
commit 912bec79ca
1 changed files with 1 additions and 1 deletions

View File

@ -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.