about summary refs log tree commit diff
path: root/tests/codegen/simd/packed-simd.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-05-20 21:53:57 +0200
committerRalf Jung <post@ralfj.de>2025-06-04 08:38:49 +0200
commit321db85fb4fa58fc03e86a3a7a901ff7fb624583 (patch)
tree4f82d0cde65b6758217ed881f4ca8d34b028ad4a /tests/codegen/simd/packed-simd.rs
parent792fc2b033aea7ea7b766e38bdc40f7d6bdce8c3 (diff)
downloadrust-321db85fb4fa58fc03e86a3a7a901ff7fb624583.tar.gz
rust-321db85fb4fa58fc03e86a3a7a901ff7fb624583.zip
x86 (32/64): go back to passing SIMD vectors by-ptr
Diffstat (limited to 'tests/codegen/simd/packed-simd.rs')
-rw-r--r--tests/codegen/simd/packed-simd.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/codegen/simd/packed-simd.rs b/tests/codegen/simd/packed-simd.rs
index a27d5e3af45..73e0d29d7d6 100644
--- a/tests/codegen/simd/packed-simd.rs
+++ b/tests/codegen/simd/packed-simd.rs
@@ -30,16 +30,18 @@ fn load<T, const N: usize>(v: PackedSimd<T, N>) -> FullSimd<T, N> {
     }
 }
 
-// CHECK-LABEL: define <3 x float> @square_packed_full(ptr{{[a-z_ ]*}} align 4 {{[^,]*}})
+// CHECK-LABEL: square_packed_full
+// CHECK-SAME: ptr{{[a-z_ ]*}} sret([[RET_TYPE:[^)]+]]) [[RET_ALIGN:align (8|16)]]{{[^%]*}} [[RET_VREG:%[_0-9]*]]
+// CHECK-SAME: ptr{{[a-z_ ]*}} align 4
 #[no_mangle]
 pub fn square_packed_full(x: PackedSimd<f32, 3>) -> FullSimd<f32, 3> {
-    // The unoptimized version of this is not very interesting to check
-    // since `load` does not get inlined.
-    // opt3-NEXT: start:
-    // opt3-NEXT: load <3 x float>
+    // CHECK-NEXT: start
+    // noopt: alloca [[RET_TYPE]], [[RET_ALIGN]]
+    // CHECK: load <3 x float>
     let x = load(x);
-    // opt3-NEXT: [[VREG:%[a-z0-9_]+]] = fmul <3 x float>
-    // opt3-NEXT: ret <3 x float> [[VREG:%[a-z0-9_]+]]
+    // CHECK: [[VREG:%[a-z0-9_]+]] = fmul <3 x float>
+    // CHECK-NEXT: store <3 x float> [[VREG]], ptr [[RET_VREG]], [[RET_ALIGN]]
+    // CHECK-NEXT: ret void
     unsafe { intrinsics::simd_mul(x, x) }
 }