[PATCH] D130233: [LoopLoadElim] Add stores with matching sizes as load-store candidates
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 03:44:24 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:237
+ continue;
+ }
+
----------------
I believe the condition you are looking for is `CastInst::isBitOrNoopPointerCastable(StoreTy, LoadTy, DL)`. That should ensure that one of bitcast, inttoptr or ptrtoint is legal for these types.
================
Comment at: llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:492
+ LoadType, "store_forward_cast", Cand.Store);
+ }
+ } else
----------------
In this whole block, I believe you are looking for `CastInst::CreateBitOrPointerCast()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130233/new/
https://reviews.llvm.org/D130233
More information about the llvm-commits
mailing list