[PATCH] D137931: [RISCV] Don't use zero-stride vector load for gather if not optimized

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 00:35:31 PST 2022


pcwang-thead marked an inline comment as done.
pcwang-thead added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rvv/fixed-vector-strided-load-store-asm.ll:230
+; NOT-OPTIMIZED-NEXT:    vle8.v v8, (a6)
+; NOT-OPTIMIZED-NEXT:    vadd.vx v8, v8, a5
+; NOT-OPTIMIZED-NEXT:    vse8.v v8, (a6)
----------------
reames wrote:
> Hm, this test case is interesting.
> 
> This is a case where even with a fast broadcast load, putting the value into a scalar allows the splat to be folded into the using instruction.  This trades a scalar register for a vector one, and might be generally interesting.
> 
> Maybe a case to give some further thought, definitely not blocking for this patch.  
After thinking, I think there are some opportunities to fold splat into .vx instructions, see D138101.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137931



More information about the llvm-commits mailing list