Skip to content

[Clang][AArch64]Make Tuple Size Optional for svluti4_lane Intrinsics #123197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/arm_sve.td
Original file line number Diff line number Diff line change
Expand Up @@ -1954,13 +1954,13 @@ let SVETargetGuard = "sve2,lut", SMETargetGuard = "sme2,lut" in {
def SVLUTI4_B : SInst<"svluti4_lane[_{d}]", "dd[i", "cUc", MergeNone, "aarch64_sve_luti4_lane", [VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_1>]>;
def SVLUTI4_H : SInst<"svluti4_lane[_{d}]", "dd[i", "sUsh", MergeNone, "aarch64_sve_luti4_lane", [VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;

def SVLUTI4_x2 : SInst<"svluti4_lane[_{d}]_x2", "d2.d[i", "sUsh", MergeNone, "aarch64_sve_luti4_lane_x2", [VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;
def SVLUTI4_x2 : SInst<"svluti4_lane[_{d}_x2]", "d2.d[i", "sUsh", MergeNone, "aarch64_sve_luti4_lane_x2", [VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;
}

let SVETargetGuard = "sve2,lut,bf16", SMETargetGuard = "sme2,lut,bf16" in {
def SVLUTI2_BF16 : SInst<"svluti2_lane[_{d}]", "dd[i", "b", MergeNone, "aarch64_sve_luti2_lane", [ VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_7>]>;
def SVLUTI4_BF16 : SInst<"svluti4_lane[_{d}]", "dd[i", "b", MergeNone, "aarch64_sve_luti4_lane", [ VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;
def SVLUTI4_BF16_x2 : SInst<"svluti4_lane[_{d}]_x2", "d2.d[i", "b", MergeNone, "aarch64_sve_luti4_lane_x2", [ VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;
def SVLUTI4_BF16_x2 : SInst<"svluti4_lane[_{d}_x2]", "d2.d[i", "b", MergeNone, "aarch64_sve_luti4_lane_x2", [ VerifyRuntimeMode], [ImmCheck<2, ImmCheck0_3>]>;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
36 changes: 18 additions & 18 deletions clang/test/CodeGen/AArch64/sve2-intrinsics/acle_sve2_luti.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#ifdef SVE_OVERLOADED_FORMS
// A simple used,unused... macro, long enough to represent any SVE builtin.
#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3) A1##A3
#define SVE_ACLE_FUNC(A1,A2_UNUSED) A1
#else
#define SVE_ACLE_FUNC(A1,A2,A3) A1##A2##A3
#define SVE_ACLE_FUNC(A1,A2) A1##A2
#endif

// SME-CHECK-LABEL: @test_svluti2_lane_s8(
Expand All @@ -39,7 +39,7 @@
// CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
//
svint8_t test_svluti2_lane_s8(svint8_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_s8,)(table, indices, 0);
return SVE_ACLE_FUNC(svluti2_lane,_s8)(table, indices, 0);
}

// SME-CHECK-LABEL: @test_svluti2_lane_u8(
Expand All @@ -57,7 +57,7 @@ svint8_t test_svluti2_lane_s8(svint8_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
//
svuint8_t test_svluti2_lane_u8(svuint8_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_u8,)(table, indices, 3);
return SVE_ACLE_FUNC(svluti2_lane,_u8)(table, indices, 3);
}

// SME-CHECK-LABEL: @test_svluti2_lane_s16(
Expand All @@ -75,7 +75,7 @@ svuint8_t test_svluti2_lane_u8(svuint8_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svint16_t test_svluti2_lane_s16(svint16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_s16,)(table, indices, 0);
return SVE_ACLE_FUNC(svluti2_lane,_s16)(table, indices, 0);
}

// SME-CHECK-LABEL: @test_svluti2_lane_u16(
Expand All @@ -93,7 +93,7 @@ svint16_t test_svluti2_lane_s16(svint16_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svuint16_t test_svluti2_lane_u16(svuint16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_u16,)(table, indices, 7);
return SVE_ACLE_FUNC(svluti2_lane,_u16)(table, indices, 7);
}

// SME-CHECK-LABEL: @test_svluti2_lane_f16(
Expand All @@ -111,7 +111,7 @@ svuint16_t test_svluti2_lane_u16(svuint16_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP0]]
//
svfloat16_t test_svluti2_lane_f16(svfloat16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_f16,)(table, indices, 5);
return SVE_ACLE_FUNC(svluti2_lane,_f16)(table, indices, 5);
}

// SME-CHECK-LABEL: @test_svluti2_lane_bf16(
Expand All @@ -129,7 +129,7 @@ svfloat16_t test_svluti2_lane_f16(svfloat16_t table, svuint8_t indices) MODE_ATT
// CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
//
svbfloat16_t test_svluti2_lane_bf16(svbfloat16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti2_lane,_bf16,)(table, indices, 2);
return SVE_ACLE_FUNC(svluti2_lane,_bf16)(table, indices, 2);
}

// SME-CHECK-LABEL: @test_svluti4_lane_s8(
Expand All @@ -147,7 +147,7 @@ svbfloat16_t test_svluti2_lane_bf16(svbfloat16_t table, svuint8_t indices) MODE_
// CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
//
svint8_t test_svluti4_lane_s8(svint8_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_s8,)(table, indices, 0);
return SVE_ACLE_FUNC(svluti4_lane,_s8)(table, indices, 0);
}

// SME-CHECK-LABEL: @test_svluti4_lane_u8(
Expand All @@ -165,7 +165,7 @@ svint8_t test_svluti4_lane_s8(svint8_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]]
//
svuint8_t test_svluti4_lane_u8(svuint8_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_u8,)(table, indices, 1);
return SVE_ACLE_FUNC(svluti4_lane,_u8)(table, indices, 1);
}

// SME-CHECK-LABEL: @test_svluti4_lane_s16(
Expand All @@ -183,7 +183,7 @@ svuint8_t test_svluti4_lane_u8(svuint8_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svint16_t test_svluti4_lane_s16(svint16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_s16,)(table, indices, 0);
return SVE_ACLE_FUNC(svluti4_lane,_s16)(table, indices, 0);
}

// SME-CHECK-LABEL: @test_svluti4_lane_u16(
Expand All @@ -201,7 +201,7 @@ svint16_t test_svluti4_lane_s16(svint16_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svuint16_t test_svluti4_lane_u16(svuint16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_u16,)(table, indices, 3);
return SVE_ACLE_FUNC(svluti4_lane,_u16)(table, indices, 3);
}

// SME-CHECK-LABEL: @test_svluti4_lane_f16(
Expand All @@ -219,7 +219,7 @@ svuint16_t test_svluti4_lane_u16(svuint16_t table, svuint8_t indices) MODE_ATTR{
// CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP0]]
//
svfloat16_t test_svluti4_lane_f16(svfloat16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_f16,)(table, indices, 2);
return SVE_ACLE_FUNC(svluti4_lane,_f16)(table, indices, 2);
}

// SME-CHECK-LABEL: @test_svluti4_lane_bf16(
Expand All @@ -237,7 +237,7 @@ svfloat16_t test_svluti4_lane_f16(svfloat16_t table, svuint8_t indices) MODE_ATT
// CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
//
svbfloat16_t test_svluti4_lane_bf16(svbfloat16_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_bf16,)(table, indices, 1);
return SVE_ACLE_FUNC(svluti4_lane,_bf16)(table, indices, 1);
}

// SME-CHECK-LABEL: @test_svluti4_lane_s16_x2(
Expand All @@ -257,7 +257,7 @@ svbfloat16_t test_svluti4_lane_bf16(svbfloat16_t table, svuint8_t indices) MODE_
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svint16_t test_svluti4_lane_s16_x2(svint16x2_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_s16,_x2)(table, indices, 0);
return SVE_ACLE_FUNC(svluti4_lane,_s16_x2)(table, indices, 0);
}

// SME-CHECK-LABEL: @test_svluti4_lane_u16_x2(
Expand All @@ -277,7 +277,7 @@ svint16_t test_svluti4_lane_s16_x2(svint16x2_t table, svuint8_t indices) MODE_AT
// CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]]
//
svuint16_t test_svluti4_lane_u16_x2(svuint16x2_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_u16,_x2)(table, indices, 3);
return SVE_ACLE_FUNC(svluti4_lane,_u16_x2)(table, indices, 3);
}

// SME-CHECK-LABEL: @test_svluti4_lane_f16_x2(
Expand All @@ -297,7 +297,7 @@ svuint16_t test_svluti4_lane_u16_x2(svuint16x2_t table, svuint8_t indices) MODE_
// CPP-CHECK-NEXT: ret <vscale x 8 x half> [[TMP0]]
//
svfloat16_t test_svluti4_lane_f16_x2(svfloat16x2_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_f16,_x2)(table, indices, 2);
return SVE_ACLE_FUNC(svluti4_lane,_f16_x2)(table, indices, 2);
}

// SME-CHECK-LABEL: @test_svluti4_lane_bf16_x2(
Expand All @@ -317,5 +317,5 @@ svfloat16_t test_svluti4_lane_f16_x2(svfloat16x2_t table, svuint8_t indices) MOD
// CPP-CHECK-NEXT: ret <vscale x 8 x bfloat> [[TMP0]]
//
svbfloat16_t test_svluti4_lane_bf16_x2(svbfloat16x2_t table, svuint8_t indices) MODE_ATTR{
return SVE_ACLE_FUNC(svluti4_lane,_bf16,_x2)(table, indices, 1);
return SVE_ACLE_FUNC(svluti4_lane,_bf16_x2)(table, indices, 1);
}
Loading
Loading