[PATCH] D109419: [GlobalISel] Implement merging of stores of truncates.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 11:00:04 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h:76-80
+  bool NeedBSwap;
+  bool NeedRotate;
+  Register WideSrcVal;
+  GStore *LowestIdxStore;
+  SmallVector<GStore *> FoundStores;
----------------
arsenm wrote:
> Reverse the order of the fields?
Why?


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3923-3924
+    NumInstsChecked++;
+    if (II->isCall() || II->mayLoad() || II->hasUnmodeledSideEffects())
+      break;
+    GStore *NewStore = dyn_cast_or_null<GStore>(&*II);
----------------
arsenm wrote:
> isLoadFoldBarrier? Also need to watch out for volatile/atomic
`isLoadFoldBarrier()` would also trigger for stores so I think its simpler to explicitly check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109419



More information about the llvm-commits mailing list