[PATCH] D130233: [LoopLoadElim] Add stores with matching sizes as load-store candidates

mgabka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 00:57:52 PDT 2022


mgabka added reviewers: david-arm, paulwalker-arm.
mgabka added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:216
+      // Only progagate the value if the pointees are the same size.
+      if (getLoadStoreType(Store)->getScalarSizeInBits() !=
+          getLoadStoreType(Load)->getScalarSizeInBits())
----------------
is it worth to make this work also for vector types? the patch you proposed does not work when there is casting between scalar and vector type of the same size for example i32 and <2 x i16>, would it be useful to extend it to cover such cases?


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