[PATCH] D101100: [ConstFold] Simplify a load's GEP operand through local aliases
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 25 11:52:42 PDT 2021
rnk added inline comments.
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:874
auto *OldPtrTy = cast<PointerType>(Ptr->getType());
- Ptr = cast<Constant>(Ptr->stripPointerCasts());
+ if (ForLoadOperand)
+ Ptr = cast<Constant>(Ptr->stripPointerCastsForLoadOperand());
----------------
We talked about moving the alias handling here rather than adding an IR helper.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101100/new/
https://reviews.llvm.org/D101100
More information about the llvm-commits
mailing list