[PATCH] D158742: [RISCV] Detect bitcasted splat patterns

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 09:26:38 PDT 2023


craig.topper added a comment.

In D158742#4616663 <https://reviews.llvm.org/D158742#4616663>, @luke wrote:

> In D158742#4614309 <https://reviews.llvm.org/D158742#4614309>, @craig.topper wrote:
>
>> Should we DAGCombine some of this away? Or custom lower fixed vector bitcasts into scalable bitcast?
>
> I tried a DAGCombine of (bitcast (build_vector)) to emit splat_vector_parts, but it's a bit awkward and results in more materialisations on the stack, because it doesn't get to take advantage of the build_vector lowering optimisations. F28827287: bitcast-buildvec-combine.diff <https://reviews.llvm.org/F28827287>
>
> Will try combining/lowering it to vmv_v_x_vl directly

I was asking more about the inserts and extracts. Shouldn't we end up with a scalable vector bitcast instead of a fixed vector bitcast sandwiched between inserts and extracts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158742



More information about the llvm-commits mailing list