Feedback from chris

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman 2008-04-25 17:45:52 +00:00
parent 7c400dcb03
commit 4182db4327

View File

@ -307,8 +307,8 @@ ConstantFoldMappedInstruction(const Instruction *I) {
return ConstantFoldCompareInstOperands(CI->getPredicate(),
&Ops[0], Ops.size(), TD);
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0]))
if (const LoadInst *LI = dyn_cast<LoadInst>(I))
if (const LoadInst *LI = dyn_cast<LoadInst>(I))
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0]))
if (!LI->isVolatile() && CE->getOpcode() == Instruction::GetElementPtr)
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(CE->getOperand(0)))
if (GV->isConstant() && !GV->isDeclaration())