Skip to content

Commit 2284e12

Browse files
author
git apple-llvm automerger
committed
Merge commit '25de7325868c' from apple/main into swift/next
2 parents 2553267 + 25de732 commit 2284e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty,
710710
// fold it if the resulting pointer operand is a GlobalValue. Otherwise
711711
// there is nothing else to simplify since the GEP is already in the
712712
// most simplified form.
713-
if (auto *SimplifiedGEP = dyn_cast<GEPOperator>(Simplified)) {
713+
if (isa<GEPOperator>(Simplified)) {
714714
if (auto *GV = dyn_cast<GlobalVariable>(Simplified->getOperand(0))) {
715715
if (GV->isConstant() && GV->hasDefinitiveInitializer()) {
716716
if (Constant *V = ConstantFoldLoadThroughGEPConstantExpr(

0 commit comments

Comments
 (0)