[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 09:51:37 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 think I'm missing something, possibly two somethings.
1) It seems we already support fixed vector vector.reverse? Do we current legalize to SHUFFLE_VECTOR or something?
2) Why is the prior lowering loading the constant from the constant pool? The VID sequence here looks always profitable, even for generic shuffle lowering..
https://github.com/llvm/llvm-project/pull/104461
More information about the llvm-commits
mailing list