[llvm] [RISCV] Avoid vl toggles when lowering vector_splice/experimental_vp_splice (PR #146746)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 14:49:44 PDT 2025
================
@@ -7,10 +7,9 @@
define <2 x i64> @test_vp_splice_v2i64(<2 x i64> %va, <2 x i64> %vb, i32 zeroext %evla, i32 zeroext %evlb) {
; CHECK-LABEL: test_vp_splice_v2i64:
; CHECK: # %bb.0:
-; CHECK-NEXT: addi a0, a0, -5
-; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
-; CHECK-NEXT: vslidedown.vi v8, v8, 5
; CHECK-NEXT: vsetvli zero, a1, e64, m1, ta, ma
+; CHECK-NEXT: vslidedown.vi v8, v8, 5
+; CHECK-NEXT: addi a0, a0, -5
; CHECK-NEXT: vslideup.vx v8, v9, a0
; CHECK-NEXT: ret
----------------
preames wrote:
Isn't this test (and a bunch other in this file) ill defined? The specification of this intrinsic says the offset starts the selected region from the concatenation. Since the concatenation is at most 4 elements long, isn't the result always poison?
https://github.com/llvm/llvm-project/pull/146746
More information about the llvm-commits
mailing list