[PATCH] D88789: [InstCombine] Revert rL226781 "Teach InstCombine to canonicalize loads which are only ever stored to always use a legal integer type if one is available." (PR47592)

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 4 15:12:58 PDT 2020


efriedma added a comment.

In D88789#2310606 <https://reviews.llvm.org/D88789#2310606>, @chandlerc wrote:

> FWIW, I still very much feel that this is the correct canonicalization, and that downstream problems *must* be fixed downstream. Avoiding this canonicalization doesn't actually fix them, it just makes us less *aware* of the problems that still fundamentally exist. =[

I'd agree if we excluded all pointers from canonicalization.  But the semantics of inttoptr and inttoptr-equivalent memory operations are weird; in general, I'm not sure we can recover the original semantics of the code if we throw away the pointer-ness of pointer load/store operations.

To address the issue at hand, I think changing the isNonIntegralPointerType() check to just isPtrOrPtrVectorTy() would be enough.  I think that might make sense?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88789/new/

https://reviews.llvm.org/D88789



More information about the cfe-commits mailing list