[PATCH] D37832: Eliminate PHI (int typed) which is only used by inttoptr

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 21 08:35:05 PDT 2017


nlopes added a comment.

Ok, mea culpa, I thought CreateBitOrPointerCast() would simply create a bitcast.
Then, what we have here is:
v = phi(ptr2int(p), ptr2int(q))

>
=

v = ptr2int(phi(p, q))

This is mostly correct. And even if it's not totally correct (at least it's not in our model), it's easy to fix it later.  (JFYI: in our model you would need to check there's no int2ptr between ptr2int and the phi).
Anyway, I'm not going to oppose any further against this patch. We don't have a finalized model ourselves, so no one can currently say whether it's correct or not.


https://reviews.llvm.org/D37832





More information about the llvm-commits mailing list