From 22abceee051e3e74281df3e4dde585e446ee5dae Mon Sep 17 00:00:00 2001 From: qaijuang <237468078+qaijuang@users.noreply.github.com> Date: Sun, 24 May 2026 09:24:32 -0400 Subject: [PATCH] codegen: re-enable FileCheck for scalable-vector tuple intrinsics --- .../scalable-vectors/tuple-intrinsics.rs | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tests/codegen-llvm/scalable-vectors/tuple-intrinsics.rs b/tests/codegen-llvm/scalable-vectors/tuple-intrinsics.rs index 7a990b29e6ca..26bb364c53d0 100644 --- a/tests/codegen-llvm/scalable-vectors/tuple-intrinsics.rs +++ b/tests/codegen-llvm/scalable-vectors/tuple-intrinsics.rs @@ -1,5 +1,3 @@ -// FIXME: The FileCheck directives in this test are unchecked and probably broken. -//@ skip-filecheck //@ only-aarch64 #![crate_type = "lib"] #![allow(incomplete_features, internal_features)] @@ -38,27 +36,29 @@ pub fn svdup_n_f32(op: f32) -> svfloat32_t { unsafe { _svdup_n_f32(op) } } -// CHECK: define { , } @svcreate2_f32( %x0, %x1) +// CHECK-LABEL: define { , } @svcreate2_f32( +// CHECK-SAME: %x0, %x1) #[no_mangle] #[target_feature(enable = "sve")] pub fn svcreate2_f32(x0: svfloat32_t, x1: svfloat32_t) -> svfloat32x2_t { - // CHECK: %1 = insertvalue { , } poison, %x0, 0 - // CHECK-NEXT: %2 = insertvalue { , } %1, %x1, 1 + // CHECK: [[TUP0:%.*]] = insertvalue { , } poison, %x0, 0 + // CHECK-NEXT: [[TUP1:%.*]] = insertvalue { , } [[TUP0]], %x1, 1 unsafe { std::intrinsics::simd::scalable::sve_tuple_create2(x0, x1) } } -// CHECK: define { , , } @svcreate3_f32( %x0, %x1, %x2) +// CHECK-LABEL: define { , , } @svcreate3_f32( +// CHECK-SAME: %x0, %x1, %x2) #[no_mangle] #[target_feature(enable = "sve")] pub fn svcreate3_f32(x0: svfloat32_t, x1: svfloat32_t, x2: svfloat32_t) -> svfloat32x3_t { - // CHECK-LABEL: @_RNvCsk3YxfLN8zWY_6tuples13svcreate3_f32 - // CHECK: %1 = insertvalue { , , } poison, %x0, 0 - // CHECK-NEXT: %2 = insertvalue { , , } %1, %x1, 1 - // CHECK-NEXT: %3 = insertvalue { , , } %2, %x2, 2 + // CHECK: [[TUP0:%.*]] = insertvalue { , , } poison, %x0, 0 + // CHECK-NEXT: [[TUP1:%.*]] = insertvalue { , , } [[TUP0]], %x1, 1 + // CHECK-NEXT: [[TUP2:%.*]] = insertvalue { , , } [[TUP1]], %x2, 2 unsafe { std::intrinsics::simd::scalable::sve_tuple_create3(x0, x1, x2) } } -// CHECK: define { , , , } @svcreate4_f32( %x0, %x1, %x2, %x3) +// CHECK-LABEL: define { , , , } @svcreate4_f32( +// CHECK-SAME: %x0, %x1, %x2, %x3) #[no_mangle] #[target_feature(enable = "sve")] pub fn svcreate4_f32( @@ -67,35 +67,36 @@ pub fn svcreate4_f32( x2: svfloat32_t, x3: svfloat32_t, ) -> svfloat32x4_t { - // CHECK-LABEL: @_RNvCsk3YxfLN8zWY_6tuples13svcreate4_f32 - // CHECK: %1 = insertvalue { , , , } poison, %x0, 0 - // CHECK-NEXT: %2 = insertvalue { , , , } %1, %x1, 1 - // CHECK-NEXT: %3 = insertvalue { , , , } %2, %x2, 2 - // CHECK-NEXT: %4 = insertvalue { , , , } %3, %x3, 3 + // CHECK: [[TUP0:%.*]] = insertvalue { , , , } poison, %x0, 0 + // CHECK-NEXT: [[TUP1:%.*]] = insertvalue { , , , } [[TUP0]], %x1, 1 + // CHECK-NEXT: [[TUP2:%.*]] = insertvalue { , , , } [[TUP1]], %x2, 2 + // CHECK-NEXT: [[TUP3:%.*]] = insertvalue { , , , } [[TUP2]], %x3, 3 unsafe { std::intrinsics::simd::scalable::sve_tuple_create4(x0, x1, x2, x3) } } -// CHECK: define @svget2_f32({ , } %tup) +// CHECK-LABEL: define @svget2_f32( +// CHECK-SAME: { , } %tup) #[no_mangle] #[target_feature(enable = "sve")] -pub fn svget2_f32(tup: svfloat32x2_t) -> svfloat32_t { - // CHECK: %1 = extractvalue { , } %tup, 0 - unsafe { std::intrinsics::simd::scalable::sve_tuple_get::<_, _, { IDX }>(tup) } +pub fn svget2_f32(tup: svfloat32x2_t) -> svfloat32_t { + // CHECK: [[X:%.*]] = extractvalue { , } %tup, 0 + unsafe { std::intrinsics::simd::scalable::sve_tuple_get::<_, _, 0>(tup) } } -// CHECK: define { , } @svset2_f32({ , } %tup, %x) +// CHECK-LABEL: define { , } @svset2_f32( +// CHECK-SAME: { , } %tup, %x) #[no_mangle] #[target_feature(enable = "sve")] -pub fn svset2_f32(tup: svfloat32x2_t, x: svfloat32_t) -> svfloat32x2_t { - // CHECK: %1 = insertvalue { , } %tup, %x, 0 - unsafe { std::intrinsics::simd::scalable::sve_tuple_set::<_, _, { IDX }>(tup, x) } +pub fn svset2_f32(tup: svfloat32x2_t, x: svfloat32_t) -> svfloat32x2_t { + // CHECK: [[TUP:%.*]] = insertvalue { , } %tup, %x, 0 + unsafe { std::intrinsics::simd::scalable::sve_tuple_set::<_, _, 0>(tup, x) } } -// This function exists only so there are calls to the generic functions +// This function exists only so there are calls to the intrinsics #[target_feature(enable = "sve")] pub fn test() { let x = svdup_n_f32(2f32); let tup = svcreate2_f32(x, x); - let x = svget2_f32::<0>(tup); - let tup = svset2_f32::<0>(tup, x); + let x = svget2_f32(tup); + let _tup = svset2_f32(tup, x); }