[PATCH] D141777: [X86] Reenable store merging post-legalization

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 06:14:23 PST 2023


barannikov88 added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:606
+  enum class StoreSource {
+    Unknown,
+    Constant,
----------------
Appears unused with std::optional.



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.h:1072-1073
+                                      StoreSource StoreSrc) const override {
+      return StoreSrc == StoreSource::Unknown ||
+             StoreSrc != StoreSource::ExtractSubvector;
     }
----------------
lebedev.ri wrote:
> This is a bit ugly. I'm using `StoreSource::Unknown` as
> "we are post-legalization. do we allow merging *any* sources?".
> Is that too ugly?
Just always pass "valid" StoreSrc as determined by getStoreSource?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141777



More information about the llvm-commits mailing list