[PATCH] D110168: [InstSimplify] Don't lose inbounds when simplifying a GEP
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 21 09:51:16 PDT 2021
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Scalar/NewGVN.cpp:1197
return Simplified;
- } else if (isa<GetElementPtrInst>(I)) {
- Value *V = SimplifyGEPInst(
- E->getType(), ArrayRef<Value *>(E->op_begin(), E->op_end()), SQ);
+ } else if (auto GEPI = dyn_cast<GetElementPtrInst>(I)) {
+ Value *V = SimplifyGEPInst(GEPI->getSourceElementType(),
----------------
Legit warning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110168/new/
https://reviews.llvm.org/D110168
More information about the llvm-commits
mailing list