[PATCH] D88979: [InstCombine] combineLoadToOperationType(): don't fold int<->ptr cast into load

Nuno Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 11 08:16:58 PDT 2020


nlopes added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:563
     if (auto* CI = dyn_cast<CastInst>(LI.user_back()))
-      if (CI->isNoopCast(DL))
+      if (CI->isNoopCast(DL) && LI.getType()->isPtrOrPtrVectorTy() ==
+                                    CI->getDestTy()->isPtrOrPtrVectorTy())
----------------
What about fixing isNoopCast() directly?
Is the impact too bad/large?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88979



More information about the cfe-commits mailing list