[llvm] [AArch64] Address issue reported in PR#196029 (PR #199122)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 08:08:57 PDT 2026


================
@@ -202,4 +202,32 @@ define void @store_trunc_v32i16i8(ptr %ap, ptr %dest) #0 {
   ret void
 }
 
+define void @store_trunc_v4i64i32(ptr %src, ptr %dest) vscale_range(1,0) #0 {
+; CHECK-LABEL: store_trunc_v4i64i32:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    ldp q1, q0, [x0]
+; CHECK-NEXT:    uzp1 v0.4s, v1.4s, v0.4s
+; CHECK-NEXT:    str q0, [x1]
+; CHECK-NEXT:    ret
+  %ld = load <4 x i64>, ptr %src, align 4
+  %trunc = trunc <4 x i64> %ld to <4 x i32>
+  store <4 x i32> %trunc, ptr %dest, align 8
+  ret void
+}
+
+
+define void @store_trunc_v4i64i32_sve_no_neon(ptr %src, ptr %dest) vscale_range(1,0) "target-features"="-neon,+sve" {
----------------
paulwalker-arm wrote:

I see this as just a bogus test because SVE without NEON is an invalid implementation.  This is why I suggested varying the test by `vscale_range(1,0)` and `vscale_range(2,0)` because I believe this best shows the intent. Specially, for `vscale_range(1,0)` we use `ldp` but for `vscale_range(2,0)` we use SVE because the registers are big enough to only require a single `ld1`.

https://github.com/llvm/llvm-project/pull/199122


More information about the llvm-commits mailing list