diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-04-25 17:45:52 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-04-25 17:45:52 +0000 |
commit | 4182db432713a92982e820af8367ce81e3404998 (patch) | |
tree | d299d8e39afe4034cc49b4f3e8e5aeb5566cf7d5 /lib/Transforms/Utils/CloneFunction.cpp | |
parent | 7c400dcb03074059776e39432c12c2a560c94223 (diff) |
Feedback from chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 54c6a809da..57369143b4 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -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()) |