[PATCH] D154009: [InstCombine] Folding `(inttoptr (and (ptrtoint Ptr), Mask))` -> `@llvm.ptrmask(Ptr, Mask)`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 14:26:41 PDT 2023


nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.

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.


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