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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 06:27:22 PST 2023


lebedev.ri marked 2 inline comments as done.
lebedev.ri added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:606
+  enum class StoreSource {
+    Unknown,
+    Constant,
----------------
barannikov88 wrote:
> Appears unused with std::optional.
> 
I do not follow. Both the struct and the element are both clearly still used.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.h:1072-1073
+                                      StoreSource StoreSrc) const override {
+      return StoreSrc == StoreSource::Unknown ||
+             StoreSrc != StoreSource::ExtractSubvector;
     }
----------------
barannikov88 wrote:
> 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?
> 
The idea is that there is no point in ever trying to guess the `StoreSource`,
which may be costly to do, if the target will always refuse.


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