https://github.com/Michael-Chen-NJU created https://github.com/llvm/llvm-project/pull/240255
Regenerate the scalar widening zip checks added in #238758 with `update_cc_test_checks.py`, preserving the script output for RV32 and RV64. From 3447a931ee86343a0896cbd0f6a18c598dbad3c0 Mon Sep 17 00:00:00 2001 From: Michael-Chen-NJU <[email protected]> Date: Mon, 9 Nov 2026 11:43:29 +0800 Subject: [PATCH] [RISCV][P-ext] Regenerate scalar widening zip checks. NFC Regenerate rvp-intrinsics.c with update_cc_test_checks.py to replace the manually combined RV32/RV64 checks added in #238758. --- clang/test/CodeGen/RISCV/rvp-intrinsics.c | 48 +++++++++++++++-------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/clang/test/CodeGen/RISCV/rvp-intrinsics.c b/clang/test/CodeGen/RISCV/rvp-intrinsics.c index 409c4999edd233..8ceb7f054c78b6 100644 --- a/clang/test/CodeGen/RISCV/rvp-intrinsics.c +++ b/clang/test/CodeGen/RISCV/rvp-intrinsics.c @@ -206,36 +206,52 @@ uint32_t test_asubu_u32(uint32_t a, uint32_t b) { /* Scalar Widening Zip */ -// CHECK-LABEL: define dso_local i64 @test_wzip8p_64( +// RV32-LABEL: define dso_local i64 @test_wzip8p_64( // RV32-SAME: i32 noundef [[RS1:%.*]], i32 noundef [[RS2:%.*]]) #[[ATTR0]] { +// RV32-NEXT: [[ENTRY:.*:]] +// RV32-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <4 x i8> +// RV32-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <4 x i8> +// RV32-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <4 x i8> [[TMP0]], <4 x i8> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7> +// RV32-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[SHUFFLE_I]] to i64 +// RV32-NEXT: ret i64 [[TMP2]] +// +// RV64-LABEL: define dso_local i64 @test_wzip8p_64( // RV64-SAME: i32 noundef signext [[RS1:%.*]], i32 noundef signext [[RS2:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <4 x i8> -// CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <4 x i8> -// CHECK-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <4 x i8> [[TMP0]], <4 x i8> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7> -// CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[SHUFFLE_I]] to i64 -// CHECK-NEXT: ret i64 [[TMP2]] +// RV64-NEXT: [[ENTRY:.*:]] +// RV64-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <4 x i8> +// RV64-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <4 x i8> +// RV64-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <4 x i8> [[TMP0]], <4 x i8> [[TMP1]], <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7> +// RV64-NEXT: [[TMP2:%.*]] = bitcast <8 x i8> [[SHUFFLE_I]] to i64 +// RV64-NEXT: ret i64 [[TMP2]] // uint64_t test_wzip8p_64(uint32_t rs1, uint32_t rs2) { return __riscv_wzip8p_64(rs1, rs2); } -// CHECK-LABEL: define dso_local i64 @test_wzip16p_64( +// RV32-LABEL: define dso_local i64 @test_wzip16p_64( // RV32-SAME: i32 noundef [[RS1:%.*]], i32 noundef [[RS2:%.*]]) #[[ATTR0]] { +// RV32-NEXT: [[ENTRY:.*:]] +// RV32-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <2 x i16> +// RV32-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <2 x i16> +// RV32-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <2 x i16> [[TMP0]], <2 x i16> [[TMP1]], <4 x i32> <i32 0, i32 2, i32 1, i32 3> +// RV32-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[SHUFFLE_I]] to i64 +// RV32-NEXT: ret i64 [[TMP2]] +// +// RV64-LABEL: define dso_local i64 @test_wzip16p_64( // RV64-SAME: i32 noundef signext [[RS1:%.*]], i32 noundef signext [[RS2:%.*]]) #[[ATTR0]] { -// CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <2 x i16> -// CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <2 x i16> -// CHECK-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <2 x i16> [[TMP0]], <2 x i16> [[TMP1]], <4 x i32> <i32 0, i32 2, i32 1, i32 3> -// CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[SHUFFLE_I]] to i64 -// CHECK-NEXT: ret i64 [[TMP2]] +// RV64-NEXT: [[ENTRY:.*:]] +// RV64-NEXT: [[TMP0:%.*]] = bitcast i32 [[RS1]] to <2 x i16> +// RV64-NEXT: [[TMP1:%.*]] = bitcast i32 [[RS2]] to <2 x i16> +// RV64-NEXT: [[SHUFFLE_I:%.*]] = shufflevector <2 x i16> [[TMP0]], <2 x i16> [[TMP1]], <4 x i32> <i32 0, i32 2, i32 1, i32 3> +// RV64-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[SHUFFLE_I]] to i64 +// RV64-NEXT: ret i64 [[TMP2]] // uint64_t test_wzip16p_64(uint32_t rs1, uint32_t rs2) { return __riscv_wzip16p_64(rs1, rs2); } // CHECK-LABEL: define dso_local i64 @test_wzip8p_64_constant( -// CHECK-SAME: ) #[[ATTR0]] { +// CHECK-SAME: ) #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: ret i64 -105873736745117663 // @@ -669,7 +685,7 @@ int64_t test_mqrwacc_i64(int64_t rd, int32_t a, int32_t b) { /* Packed Splat (32-bit) */ // CHECK-LABEL: define dso_local i32 @test_pmv_s_u8x4( -// CHECK-SAME: i8 noundef zeroext [[X:%.*]]) #[[ATTR0:[0-9]+]] { +// CHECK-SAME: i8 noundef zeroext [[X:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[VECINIT_I:%.*]] = insertelement <4 x i8> poison, i8 [[X]], i64 0 // CHECK-NEXT: [[VECINIT3_I:%.*]] = shufflevector <4 x i8> [[VECINIT_I]], <4 x i8> poison, <4 x i32> zeroinitializer _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
