Skip to content

Commit f112caf

Browse files
authored
[Clang] Rename and enable boolean get, set, create and undef for sme2 (#77338)
This patch renames the get, set, create and undef functions that deal with tuples of booleans to match the ACLE at https://github.com/ARM-software/acle/pull/257/files . It also enables them for SME2.
1 parent 12e425d commit f112caf

File tree

9 files changed

+141
-70
lines changed

9 files changed

+141
-70
lines changed

clang/include/clang/Basic/arm_sve.td

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,9 +1296,9 @@ def SVCREATE_3_BF16 : SInst<"svcreate3[_{d}]", "3ddd", "b", MergeNone, "", [IsT
12961296
def SVCREATE_4_BF16 : SInst<"svcreate4[_{d}]", "4dddd", "b", MergeNone, "", [IsTupleCreate]>;
12971297
}
12981298

1299-
let TargetGuard = "sve2p1" in {
1300-
def SVCREATE_2_B : SInst<"svcreate2[_{d}]", "2dd", "Pc", MergeNone, "", [IsTupleCreate]>;
1301-
def SVCREATE_4_B : SInst<"svcreate4[_{d}]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate]>;
1299+
let TargetGuard = "sve2p1|sme2" in {
1300+
def SVCREATE_2_B : SInst<"svcreate2[_b]", "2dd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
1301+
def SVCREATE_4_B : SInst<"svcreate4[_b]", "4dddd", "Pc", MergeNone, "", [IsTupleCreate, IsStreamingCompatible]>;
13021302
}
13031303

13041304
////////////////////////////////////////////////////////////////////////////////
@@ -1321,12 +1321,17 @@ def SVSET_3_BF16 : SInst<"svset3[_{d}]", "33id", "b", MergeNone, "", [IsTupleSet
13211321
def SVSET_4_BF16 : SInst<"svset4[_{d}]", "44id", "b", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
13221322
}
13231323

1324-
let TargetGuard = "sve2p1" in {
1325-
def SVGET_2_B : SInst<"svget2[_{d}]", "d2i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_1>]>;
1326-
def SVGET_4_B : SInst<"svget4[_{d}]", "d4i", "Pc", MergeNone, "", [IsTupleGet], [ImmCheck<1, ImmCheck0_3>]>;
1324+
let TargetGuard = "sve2p1|sme2" in {
1325+
def SVGET_2_B : SInst<"svget2[_b]", "d2i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1326+
def SVGET_4_B : SInst<"svget4[_b]", "d4i", "Pc", MergeNone, "", [IsTupleGet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
13271327

1328-
def SVSET_2_B : SInst<"svset2[_{d}]", "22id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_1>]>;
1329-
def SVSET_4_B : SInst<"svset4[_{d}]", "44id", "Pc", MergeNone, "", [IsTupleSet], [ImmCheck<1, ImmCheck0_3>]>;
1328+
def SVSET_2_B : SInst<"svset2[_b]", "22id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
1329+
def SVSET_4_B : SInst<"svset4[_b]", "44id", "Pc", MergeNone, "", [IsTupleSet, IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
1330+
}
1331+
1332+
let TargetGuard = "sve2p1|sme2" in {
1333+
def SVUNDEF_2_B: Inst<"svundef2_b", "2", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
1334+
def SVUNDEF_4_B: Inst<"svundef4_b", "4", "Pc", MergeNone, "", [IsUndef, IsStreamingCompatible], []>;
13301335
}
13311336
////////////////////////////////////////////////////////////////////////////////
13321337
// SVE2 WhileGE/GT

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create2_bool.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -20,19 +25,19 @@
2025
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
2126
#endif
2227

23-
// CHECK-LABEL: @test_svcreate2_s8(
28+
// CHECK-LABEL: @test_svcreate2_b(
2429
// CHECK-NEXT: entry:
2530
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
2631
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
2732
// CHECK-NEXT: ret <vscale x 32 x i1> [[TMP1]]
2833
//
29-
// CPP-CHECK-LABEL: @_Z17test_svcreate2_s8u10__SVBool_tS_(
34+
// CPP-CHECK-LABEL: @_Z16test_svcreate2_bu10__SVBool_tS_(
3035
// CPP-CHECK-NEXT: entry:
3136
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
3237
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
3338
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP1]]
3439
//
35-
svboolx2_t test_svcreate2_s8(svbool_t x0, svbool_t x1)
40+
svboolx2_t test_svcreate2_b(svbool_t x0, svbool_t x1)
3641
{
37-
return SVE_ACLE_FUNC(svcreate2,_b8,,)(x0, x1);
42+
return SVE_ACLE_FUNC(svcreate2,_b,,)(x0, x1);
3843
}

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create4_bool.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -20,23 +25,23 @@
2025
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
2126
#endif
2227

23-
// CHECK-LABEL: @test_svcreate4_b8(
28+
// CHECK-LABEL: @test_svcreate4_b(
2429
// CHECK-NEXT: entry:
2530
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
2631
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
2732
// CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP1]], <vscale x 16 x i1> [[X2:%.*]], i64 32)
2833
// CHECK-NEXT: [[TMP3:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP2]], <vscale x 16 x i1> [[X4:%.*]], i64 48)
2934
// CHECK-NEXT: ret <vscale x 64 x i1> [[TMP3]]
3035
//
31-
// CPP-CHECK-LABEL: @_Z17test_svcreate4_b8u10__SVBool_tS_S_S_(
36+
// CPP-CHECK-LABEL: @_Z16test_svcreate4_bu10__SVBool_tS_S_S_(
3237
// CPP-CHECK-NEXT: entry:
3338
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> poison, <vscale x 16 x i1> [[X0:%.*]], i64 0)
3439
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP0]], <vscale x 16 x i1> [[X1:%.*]], i64 16)
3540
// CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP1]], <vscale x 16 x i1> [[X2:%.*]], i64 32)
3641
// CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TMP2]], <vscale x 16 x i1> [[X4:%.*]], i64 48)
3742
// CPP-CHECK-NEXT: ret <vscale x 64 x i1> [[TMP3]]
3843
//
39-
svboolx4_t test_svcreate4_b8(svbool_t x0, svbool_t x1, svbool_t x2, svbool_t x4)
44+
svboolx4_t test_svcreate4_b(svbool_t x0, svbool_t x1, svbool_t x2, svbool_t x4)
4045
{
41-
return SVE_ACLE_FUNC(svcreate4,_b8,,)(x0, x1, x2, x4);
46+
return SVE_ACLE_FUNC(svcreate4,_b,,)(x0, x1, x2, x4);
4247
}

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get2_bool.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116
// REQUIRES: aarch64-registered-target
1217
#include <arm_sve.h>
1318

@@ -18,32 +23,32 @@
1823
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
1924
#endif
2025

21-
// CHECK-LABEL: @test_svget2_b8_0(
26+
// CHECK-LABEL: @test_svget2_b_0(
2227
// CHECK-NEXT: entry:
2328
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv32i1(<vscale x 32 x i1> [[TUPLE:%.*]], i64 0)
2429
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
2530
//
26-
// CPP-CHECK-LABEL: @_Z16test_svget2_b8_010svboolx2_t(
31+
// CPP-CHECK-LABEL: @_Z15test_svget2_b_010svboolx2_t(
2732
// CPP-CHECK-NEXT: entry:
2833
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv32i1(<vscale x 32 x i1> [[TUPLE:%.*]], i64 0)
2934
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
3035
//
31-
svbool_t test_svget2_b8_0(svboolx2_t tuple)
36+
svbool_t test_svget2_b_0(svboolx2_t tuple)
3237
{
33-
return SVE_ACLE_FUNC(svget2,_b8,,)(tuple, 0);
38+
return SVE_ACLE_FUNC(svget2,_b,,)(tuple, 0);
3439
}
3540

36-
// CHECK-LABEL: @test_svget2_b8_1(
41+
// CHECK-LABEL: @test_svget2_b_1(
3742
// CHECK-NEXT: entry:
3843
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv32i1(<vscale x 32 x i1> [[TUPLE:%.*]], i64 16)
3944
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
4045
//
41-
// CPP-CHECK-LABEL: @_Z16test_svget2_b8_110svboolx2_t(
46+
// CPP-CHECK-LABEL: @_Z15test_svget2_b_110svboolx2_t(
4247
// CPP-CHECK-NEXT: entry:
4348
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv32i1(<vscale x 32 x i1> [[TUPLE:%.*]], i64 16)
4449
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
4550
//
46-
svbool_t test_svget2_b8_1(svboolx2_t tuple)
51+
svbool_t test_svget2_b_1(svboolx2_t tuple)
4752
{
48-
return SVE_ACLE_FUNC(svget2,_b8,,)(tuple, 1);
53+
return SVE_ACLE_FUNC(svget2,_b,,)(tuple, 1);
4954
}

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get4_bool.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -22,51 +27,51 @@
2227

2328
// NOTE: For these tests clang converts the struct parameter into
2429
// several parameters, one for each member of the original struct.
25-
// CHECK-LABEL: @test_svget4_b8_0(
30+
// CHECK-LABEL: @test_svget4_b_0(
2631
// CHECK-NEXT: entry:
2732
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 0)
2833
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
2934
//
30-
// CPP-CHECK-LABEL: @_Z16test_svget4_b8_010svboolx4_t(
35+
// CPP-CHECK-LABEL: @_Z15test_svget4_b_010svboolx4_t(
3136
// CPP-CHECK-NEXT: entry:
3237
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 0)
3338
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
3439
//
35-
svbool_t test_svget4_b8_0(svboolx4_t tuple)
40+
svbool_t test_svget4_b_0(svboolx4_t tuple)
3641
{
37-
return SVE_ACLE_FUNC(svget4,_b8,,)(tuple, 0);
42+
return SVE_ACLE_FUNC(svget4,_b,,)(tuple, 0);
3843
}
3944

4045
// NOTE: For these tests clang converts the struct parameter into
4146
// several parameters, one for each member of the original struct.
42-
// CHECK-LABEL: @test_svget4_b8_1(
47+
// CHECK-LABEL: @test_svget4_b_1(
4348
// CHECK-NEXT: entry:
4449
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 16)
4550
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
4651
//
47-
// CPP-CHECK-LABEL: @_Z16test_svget4_b8_110svboolx4_t(
52+
// CPP-CHECK-LABEL: @_Z15test_svget4_b_110svboolx4_t(
4853
// CPP-CHECK-NEXT: entry:
4954
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 16)
5055
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
5156
//
52-
svbool_t test_svget4_b8_1(svboolx4_t tuple)
57+
svbool_t test_svget4_b_1(svboolx4_t tuple)
5358
{
54-
return SVE_ACLE_FUNC(svget4,_b8,,)(tuple, 1);
59+
return SVE_ACLE_FUNC(svget4,_b,,)(tuple, 1);
5560
}
5661

5762
// NOTE: For these tests clang converts the struct parameter into
5863
// several parameters, one for each member of the original struct.
59-
// CHECK-LABEL: @test_svget4_b8_3(
64+
// CHECK-LABEL: @test_svget4_b_3(
6065
// CHECK-NEXT: entry:
6166
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 48)
6267
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
6368
//
64-
// CPP-CHECK-LABEL: @_Z16test_svget4_b8_310svboolx4_t(
69+
// CPP-CHECK-LABEL: @_Z15test_svget4_b_310svboolx4_t(
6570
// CPP-CHECK-NEXT: entry:
6671
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.vector.extract.nxv16i1.nxv64i1(<vscale x 64 x i1> [[TUPLE:%.*]], i64 48)
6772
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
6873
//
69-
svbool_t test_svget4_b8_3(svboolx4_t tuple)
74+
svbool_t test_svget4_b_3(svboolx4_t tuple)
7075
{
71-
return SVE_ACLE_FUNC(svget4,_b8,,)(tuple, 3);
76+
return SVE_ACLE_FUNC(svget4,_b,,)(tuple, 3);
7277
}

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set2_bool.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
66
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
77
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
810
// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
911
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13+
// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
1014
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
1116

1217
// REQUIRES: aarch64-registered-target
1318

@@ -20,33 +25,33 @@
2025
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
2126
#endif
2227

23-
// CHECK-LABEL: @test_svset2_b8_0(
28+
// CHECK-LABEL: @test_svset2_b_0(
2429
// CHECK-NEXT: entry:
2530
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 0)
2631
// CHECK-NEXT: ret <vscale x 32 x i1> [[TMP0]]
2732
//
28-
// CPP-CHECK-LABEL: @_Z16test_svset2_b8_010svboolx2_tu10__SVBool_t(
33+
// CPP-CHECK-LABEL: @_Z15test_svset2_b_010svboolx2_tu10__SVBool_t(
2934
// CPP-CHECK-NEXT: entry:
3035
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 0)
3136
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP0]]
3237
//
33-
svboolx2_t test_svset2_b8_0(svboolx2_t tuple, svbool_t x)
38+
svboolx2_t test_svset2_b_0(svboolx2_t tuple, svbool_t x)
3439
{
35-
return SVE_ACLE_FUNC(svset2,_b8,,)(tuple, 0, x);
40+
return SVE_ACLE_FUNC(svset2,_b,,)(tuple, 0, x);
3641
}
3742

38-
// CHECK-LABEL: @test_svset2_b8_1(
43+
// CHECK-LABEL: @test_svset2_b_1(
3944
// CHECK-NEXT: entry:
4045
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 16)
4146
// CHECK-NEXT: ret <vscale x 32 x i1> [[TMP0]]
4247
//
43-
// CPP-CHECK-LABEL: @_Z16test_svset2_b8_110svboolx2_tu10__SVBool_t(
48+
// CPP-CHECK-LABEL: @_Z15test_svset2_b_110svboolx2_tu10__SVBool_t(
4449
// CPP-CHECK-NEXT: entry:
4550
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 16)
4651
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP0]]
4752
//
48-
svboolx2_t test_svset2_b8_1(svboolx2_t tuple, svbool_t x)
53+
svboolx2_t test_svset2_b_1(svboolx2_t tuple, svbool_t x)
4954
{
50-
return SVE_ACLE_FUNC(svset2,_b8,,)(tuple, 1, x);
55+
return SVE_ACLE_FUNC(svset2,_b,,)(tuple, 1, x);
5156
}
5257

0 commit comments

Comments
 (0)