This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fold Int2Ptr/PtrToInt if the ptr is dereferenceable using API
Needs ReviewPublic

Authored by Krishnakariya on Aug 21 2021, 1:26 AM.



Split from D107822.
In this patch, we remove the roundtrip cast if p is dereferenceable.
We check whether p is dereferenceable using the "isDereferenceableAndAlignedPointer" API.

Diff Detail