[PATCH] D62890: [DAGCombiner] Improve tryStoreMergeOfExtracts by using double sized vector type before type legalized

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 04:23:07 PDT 2022


tingwang added a comment.

In D62890#3690606 <https://reviews.llvm.org/D62890#3690606>, @RKSimon wrote:

> Instead of a cost function, could we use (possibly tweaked) isMultiStoresCheaperThanBitsMerge?

Thank you for pointing out. I will try to come up with something to guard against cases that got degenerated.



================
Comment at: llvm/test/CodeGen/PowerPC/extract-and-store.ll:733
+; CHECK-NEXT:    xxswapd vs0, vs34
+; CHECK-NEXT:    stfdx f0, 0, r5
 ; CHECK-NEXT:    blr
----------------
RKSimon wrote:
> is this really an issue with the store merging or the ppc shuffle combines have gotten messed up?
Had a quick check, this is the case PPC::LowerVECTOR_SHUFFLE does not have efficient solution, so it turned into VPERM as last resort.

Probably the cost function should avoid this kind of situation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62890



More information about the llvm-commits mailing list