[PATCH] D99236: [RISCV] Turn splat shuffles of vector loads into scalar loads and a splat.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 08:56:48 PDT 2021


craig.topper added a comment.

In D99236#2647845 <https://reviews.llvm.org/D99236#2647845>, @frasercrmck wrote:

> How difficult would it be to opt out of this vector combine in the first place? I can imagine that this may benefit other architectures.

It looks like the VectorCombine code only considers the cost of the insert+load that it is replacing. It doesn't look at the shuffle use. So it compares the cost of vector load to the cost of a load+insert. That by itself might be profitable. But once you consider that insert+shuffle is one instruction for us, then reversing the transform makes some sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99236



More information about the llvm-commits mailing list