[PATCH] D154009: [InstCombine] Folding `(inttoptr (and (ptrtoint Ptr), Mask))` -> `@llvm.ptrmask(Ptr, Mask)`
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 14:39:20 PDT 2023
goldstein.w.n added a comment.
In D154009#4457421 <https://reviews.llvm.org/D154009#4457421>, @nikic wrote:
> This is not legal -- the fact that this is not legal is pretty much the whole reason why the ptrmask intrinsic exists in the first place. ptrmask preserves the provenance of the base object, while the ptrtoint/inttoptr sequence does not. The result of the inttoptr can have different provenance than the ptrtoint operand.
IC. Okay will abandon (likewise the rest of the series). Is there any way to get `@llvm.ptrmask` to generate in C code? Was having trouble doing that hence this patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154009/new/
https://reviews.llvm.org/D154009
More information about the llvm-commits
mailing list