[llvm] [RISCV] Lower fixed reverse vector_shuffles through vector_reverse (PR #104461)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 11:48:00 PDT 2024
================
@@ -229,10 +229,10 @@ define <32 x i8> @reverse_v32i8(<32 x i8> %a) {
; CHECK-LABEL: reverse_v32i8:
; CHECK: # %bb.0:
; CHECK-NEXT: li a0, 32
-; CHECK-NEXT: lui a1, %hi(.LCPI12_0)
-; CHECK-NEXT: addi a1, a1, %lo(.LCPI12_0)
; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
-; CHECK-NEXT: vle8.v v12, (a1)
+; CHECK-NEXT: vid.v v10
----------------
preames wrote:
I played with relaxing the immediate constraint, and stumbled into a can of worms. Basically, at high LMUL, our default VID strategy is generally not profitable. For all but the most basic cases, we're better off narrowing the constant and then generating the VID sequence. Doing that greatly reduces register pressure at high LMUL. This is a existing problem with the code, but increasing the generality of the constant emission hits it at higher frequency.
https://github.com/llvm/llvm-project/pull/104461
More information about the llvm-commits
mailing list