[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:30:05 PDT 2021


aemerson added inline comments.


================
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);
----------------
aemerson wrote:
> 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.
Actually I could use that and then explicitly check if we have a GStore. That's probably safer.


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