summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-09-15 20:10:09 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-09-15 20:10:09 +0000
commit8b16da87444eb1399ce32e7027e2ab5c69c42e5e (patch)
tree0126c7ed05ff7802951be7a3e53c6a594d992537 /llvm/lib
parent19b2aed3080eb88f982dfe97a356afa7e1467d9b (diff)
downloadbcm5719-llvm-8b16da87444eb1399ce32e7027e2ab5c69c42e5e.tar.gz
bcm5719-llvm-8b16da87444eb1399ce32e7027e2ab5c69c42e5e.zip
[InstCombine] Do not RAUW a constant GEP
canRewriteGEPAsOffset expects to process instructions, not constants. This fixes PR30342. llvm-svn: 281650
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 56fa93332f5..9604448aeba 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -625,7 +625,7 @@ static bool canRewriteGEPAsOffset(Value *Start, Value *Base,
}
if (!isa<IntToPtrInst>(V) && !isa<PtrToIntInst>(V) &&
- !isa<GEPOperator>(V) && !isa<PHINode>(V))
+ !isa<GetElementPtrInst>(V) && !isa<PHINode>(V))
// We've found some value that we can't explore which is different from
// the base. Therefore we can't do this transformation.
return false;
OpenPOWER on IntegriCloud