[PATCH] D154010: [InstCombine] Canonicalize `getelementptr` patterns to `@llvm.ptrmask`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 14:44:33 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:2247
+ Constant::getNullValue(GEP.getPointerOperand()->getType()),
+ Index));
+ Value *Mask;
----------------
nikic wrote:
> This is not legal, because it does not preserve pointer provenance. This one even fails to preserve it in a particularly catastrophic way, because the resulting pointer has nullary provenance (i.e. it is UB to perform any accesses through it).
I see, is the codes to create `@llvm.ptrmask` okay? Or should that too be abandoned?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154010/new/
https://reviews.llvm.org/D154010
More information about the llvm-commits
mailing list