[PATCH] D121111: [RISCV] Also sink a splat for the first operand of instructions with vector-scalar cases
Roger Ferrer Ibanez via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 06:25:28 PST 2022
rogfer01 added a comment.
Ok, regarding the testing in `sink-splat-operands-commute.ll` I took the relevant operations in `sink-splat-operands.ll` and swapped the input so the broadcast operand is the first one. They generate the same input (the only difference is the basic block IDs).
If we feel this is too much I can integrate that in `sink-splat-operands.ll`.
================
Comment at: llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll:3037
; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
-; CHECK-NEXT: vle32.v v9, (a0)
+; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu
+; CHECK-NEXT: vle32.v v8, (a0)
----------------
This is an interesting case!
By doing this we are increasing the number of `vsetvli`s in the loop from 2 to 3. However we could hoist the first one outside the loop because the state of `vl` and `vtype` right before the latch (`bnez`) is exactly the same.
I guess we can fix this in a specific change in `RISCVInsertVSETVLI.cpp`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121111/new/
https://reviews.llvm.org/D121111
More information about the llvm-commits
mailing list