[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 3 16:47:03 PDT 2019
rjmccall added a comment.
I agree with Eli that this isn't obviously a legal transformation. `llvm.ptrmask` appears to make semantic guarantees about e.g. the pointer after the mask referring to the same underlying object, which means we can only safely emit it when something about the source program makes that guarantee. It's not at all clear that C does so for an expression like `(T*) ((intptr_t) x & N)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64128/new/
https://reviews.llvm.org/D64128
More information about the cfe-commits
mailing list