[clang] [Clang][SVE2.1] Make a part of the name optional for `svwhileXX` builtins with predicate-as-counter (PR #75200)

Momchil Velikov via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 09:22:40 PST 2023


https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/75200

>From bb881371fb036819a1d6489a9779e2c5ac7e7d3c Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Tue, 12 Dec 2023 15:08:33 +0000
Subject: [PATCH 1/3] [Clang][SVE2.1] Make the part of the name optional for
 `svewhileXX` builtins with predicate-as-counter

The `_s64`/`_u64` part can be omitted now. It's inferred from
the argument types.
---
 clang/include/clang/Basic/arm_sve.td          |  18 ++-
 .../acle_sve2p1_while_pn.c                    | 136 +++++++++---------
 2 files changed, 80 insertions(+), 74 deletions(-)

diff --git a/clang/include/clang/Basic/arm_sve.td b/clang/include/clang/Basic/arm_sve.td
index aa9b105364a51a..004a381523afcc 100644
--- a/clang/include/clang/Basic/arm_sve.td
+++ b/clang/include/clang/Basic/arm_sve.td
@@ -1950,19 +1950,17 @@ let TargetGuard = "sve2p1|sme2" in {
 //FIXME: Replace IsStreamingCompatible with IsStreamingOrHasSVE2p1 when available
 def SVPEXT_SINGLE : SInst<"svpext_lane_{d}", "P}i", "QcQsQiQl", MergeNone, "aarch64_sve_pext", [IsStreamingCompatible], [ImmCheck<1, ImmCheck0_3>]>;
 def SVPEXT_X2     : SInst<"svpext_lane_{d}_x2", "2.P}i", "QcQsQiQl", MergeNone, "aarch64_sve_pext_x2", [IsStreamingCompatible], [ImmCheck<1, ImmCheck0_1>]>;
-}
 
-let TargetGuard = "sve2p1" in {
 def SVFCLAMP   : SInst<"svclamp[_{d}]", "dddd", "hfd", MergeNone, "aarch64_sve_fclamp", [], []>;
 
-def SVWHILEGE_COUNT  : SInst<"svwhilege_{d}",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilege_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILEGT_COUNT  : SInst<"svwhilegt_{d}",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilegt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELE_COUNT  : SInst<"svwhilele_{d}",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilele_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELT_COUNT  : SInst<"svwhilelt_{d}",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilelt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELO_COUNT  : SInst<"svwhilelo_{d}",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilelo_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELS_COUNT  : SInst<"svwhilels_{d}",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilels_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILEHI_COUNT  : SInst<"svwhilehi_{d}",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehi_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILEHS_COUNT  : SInst<"svwhilehs_{d}",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehs_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEGE_COUNT  : SInst<"svwhilege_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilege_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEGT_COUNT  : SInst<"svwhilegt_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilegt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELE_COUNT  : SInst<"svwhilele_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilele_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELT_COUNT  : SInst<"svwhilelt_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilelt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELO_COUNT  : SInst<"svwhilelo_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilelo_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELS_COUNT  : SInst<"svwhilels_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilels_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEHI_COUNT  : SInst<"svwhilehi_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehi_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEHS_COUNT  : SInst<"svwhilehs_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehs_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
 
 def SVLD1B_X2 : MInst<"svld1[_{2}]_x2", "2}c", "cUc", [IsStructLoad], MemEltTyDefault, "aarch64_sve_ld1_pn_x2">;
 def SVLD1H_X2 : MInst<"svld1[_{2}]_x2", "2}c", "sUshb", [IsStructLoad], MemEltTyDefault, "aarch64_sve_ld1_pn_x2">;
diff --git a/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c b/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
index 3dbb38582b676c..08c1ee949c1116 100644
--- a/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
+++ b/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
@@ -1,12 +1,20 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
+// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
 
 // REQUIRES: aarch64-registered-target
 
 #include <arm_sve.h>
 
+#ifdef SVE_OVERLOADED_FORMS
+#define SVE_ACLE_FUNC(A1, A2_UNUSED) A1
+#else
+#define SVE_ACLE_FUNC(A1, A2) A1##A2
+#endif
+
 
 // WHILEGE
 
@@ -22,7 +30,7 @@
 //
 svcount_t test_svwhilege_c8_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilege_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c8,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilege_c8_vl4(
@@ -37,7 +45,7 @@ svcount_t test_svwhilege_c8_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c8_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilege_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c8,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilege_c16_vl2(
@@ -52,7 +60,7 @@ svcount_t test_svwhilege_c8_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c16_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilege_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c16,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilege_c16_vl4(
@@ -67,7 +75,7 @@ svcount_t test_svwhilege_c16_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c16_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilege_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c16,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilege_c32_vl2(
@@ -82,7 +90,7 @@ svcount_t test_svwhilege_c16_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c32_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilege_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c32,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilege_c32_vl4(
@@ -97,7 +105,7 @@ svcount_t test_svwhilege_c32_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c32_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilege_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c32,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilege_c64_vl2(
@@ -112,7 +120,7 @@ svcount_t test_svwhilege_c32_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c64_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilege_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c64,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilege_c64_vl4(
@@ -127,7 +135,7 @@ svcount_t test_svwhilege_c64_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilege_c64_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilege_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c64,_s64)(op1, op2, 4);
 }
 
 // WHILEGT
@@ -145,7 +153,7 @@ svcount_t test_svwhilege_c64_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c8_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c8,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c8_vl4(
@@ -160,7 +168,7 @@ svcount_t test_svwhilegt_c8_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c8_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c8,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c16_vl2(
@@ -175,7 +183,7 @@ svcount_t test_svwhilegt_c8_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c16_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c16,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c16_vl4(
@@ -190,7 +198,7 @@ svcount_t test_svwhilegt_c16_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c16_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c16,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c32_vl2(
@@ -205,7 +213,7 @@ svcount_t test_svwhilegt_c16_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c32_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c32,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c32_vl4(
@@ -220,7 +228,7 @@ svcount_t test_svwhilegt_c32_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c32_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c32,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c64_vl2(
@@ -235,7 +243,7 @@ svcount_t test_svwhilegt_c32_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c64_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c64,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilegt_c64_vl4(
@@ -250,7 +258,7 @@ svcount_t test_svwhilegt_c64_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilegt_c64_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilegt_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c64,_s64)(op1, op2, 4);
 }
 
 
@@ -268,7 +276,7 @@ svcount_t test_svwhilegt_c64_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilehi_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehi_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c8_vl4(
@@ -283,7 +291,7 @@ svcount_t test_svwhilehi_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehi_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c16_vl2(
@@ -298,7 +306,7 @@ svcount_t test_svwhilehi_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehi_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c16_vl4(
@@ -313,7 +321,7 @@ svcount_t test_svwhilehi_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehi_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c32_vl2(
@@ -328,7 +336,7 @@ svcount_t test_svwhilehi_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehi_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c32_vl4(
@@ -343,7 +351,7 @@ svcount_t test_svwhilehi_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehi_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c64_vl2(
@@ -358,7 +366,7 @@ svcount_t test_svwhilehi_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehi_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c64_vl4(
@@ -373,7 +381,7 @@ svcount_t test_svwhilehi_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehi_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehi_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -391,7 +399,7 @@ svcount_t test_svwhilehi_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehs_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c8_vl4(
@@ -406,7 +414,7 @@ svcount_t test_svwhilehs_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehs_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c16_vl2(
@@ -421,7 +429,7 @@ svcount_t test_svwhilehs_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehs_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c16_vl4(
@@ -436,7 +444,7 @@ svcount_t test_svwhilehs_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehs_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c32_vl2(
@@ -451,7 +459,7 @@ svcount_t test_svwhilehs_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehs_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c32_vl4(
@@ -466,7 +474,7 @@ svcount_t test_svwhilehs_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehs_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c64_vl2(
@@ -481,7 +489,7 @@ svcount_t test_svwhilehs_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilehs_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c64_vl4(
@@ -496,7 +504,7 @@ svcount_t test_svwhilehs_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilehs_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilehs_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -514,7 +522,7 @@ svcount_t test_svwhilehs_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilele_c8_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilele_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c8,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilele_c8_vl4(
@@ -529,7 +537,7 @@ svcount_t test_svwhilele_c8_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c8_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilele_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c8,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilele_c16_vl2(
@@ -544,7 +552,7 @@ svcount_t test_svwhilele_c8_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c16_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilele_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c16,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilele_c16_vl4(
@@ -559,7 +567,7 @@ svcount_t test_svwhilele_c16_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c16_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilele_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c16,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilele_c32_vl2(
@@ -574,7 +582,7 @@ svcount_t test_svwhilele_c16_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c32_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilele_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c32,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilele_c32_vl4(
@@ -589,7 +597,7 @@ svcount_t test_svwhilele_c32_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c32_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilele_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c32,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilele_c64_vl2(
@@ -604,7 +612,7 @@ svcount_t test_svwhilele_c32_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c64_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilele_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c64,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilele_c64_vl4(
@@ -619,7 +627,7 @@ svcount_t test_svwhilele_c64_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilele_c64_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilele_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c64,_s64)(op1, op2, 4);
 }
 
 
@@ -637,7 +645,7 @@ svcount_t test_svwhilele_c64_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelo_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelo_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c8_vl4(
@@ -652,7 +660,7 @@ svcount_t test_svwhilelo_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelo_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c16_vl2(
@@ -667,7 +675,7 @@ svcount_t test_svwhilelo_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelo_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c16_vl4(
@@ -682,7 +690,7 @@ svcount_t test_svwhilelo_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelo_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c32_vl2(
@@ -697,7 +705,7 @@ svcount_t test_svwhilelo_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelo_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c32_vl4(
@@ -712,7 +720,7 @@ svcount_t test_svwhilelo_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelo_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c64_vl2(
@@ -727,7 +735,7 @@ svcount_t test_svwhilelo_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelo_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c64_vl4(
@@ -742,7 +750,7 @@ svcount_t test_svwhilelo_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilelo_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelo_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -760,7 +768,7 @@ svcount_t test_svwhilelo_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilels_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c8_vl4(
@@ -775,7 +783,7 @@ svcount_t test_svwhilels_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilels_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c16_vl2(
@@ -790,7 +798,7 @@ svcount_t test_svwhilels_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilels_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c16_vl4(
@@ -805,7 +813,7 @@ svcount_t test_svwhilels_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilels_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c32_vl2(
@@ -820,7 +828,7 @@ svcount_t test_svwhilels_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilels_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c32_vl4(
@@ -835,7 +843,7 @@ svcount_t test_svwhilels_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilels_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c64_vl2(
@@ -850,7 +858,7 @@ svcount_t test_svwhilels_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilels_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c64_vl4(
@@ -865,7 +873,7 @@ svcount_t test_svwhilels_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return svwhilels_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilels_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -883,7 +891,7 @@ svcount_t test_svwhilels_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelt_c8_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c8(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c8,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c8_vl4(
@@ -898,7 +906,7 @@ svcount_t test_svwhilelt_c8_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c8_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c8(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c8,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c16_vl2(
@@ -913,7 +921,7 @@ svcount_t test_svwhilelt_c8_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c16_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c16(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c16,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c16_vl4(
@@ -928,7 +936,7 @@ svcount_t test_svwhilelt_c16_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c16_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c16(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c16,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c32_vl2(
@@ -943,7 +951,7 @@ svcount_t test_svwhilelt_c16_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c32_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c32(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c32,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c32_vl4(
@@ -958,7 +966,7 @@ svcount_t test_svwhilelt_c32_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c32_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c32(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c32,_s64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c64_vl2(
@@ -973,7 +981,7 @@ svcount_t test_svwhilelt_c32_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c64_vl2(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c64(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c64,_s64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelt_c64_vl4(
@@ -988,5 +996,5 @@ svcount_t test_svwhilelt_c64_vl2(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelt_c64_vl4(int64_t op1, int64_t op2)
 {
-  return svwhilelt_c64(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c64,_s64)(op1, op2, 4);
 }

>From 3a2ed72cf767f7db80fd5de6a684496499bd0e68 Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Wed, 13 Dec 2023 13:09:43 +0000
Subject: [PATCH 2/3] [fixup] Update svwhile_XX builtins to not have unsigned
 condition variants

The kind of comparison is derived from argument types.
---
 clang/include/clang/Basic/arm_sve.td          |  8 +--
 .../acle_sve2p1_while_pn.c                    | 64 +++++++++----------
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/clang/include/clang/Basic/arm_sve.td b/clang/include/clang/Basic/arm_sve.td
index 004a381523afcc..186db9b4388bdb 100644
--- a/clang/include/clang/Basic/arm_sve.td
+++ b/clang/include/clang/Basic/arm_sve.td
@@ -1957,10 +1957,10 @@ def SVWHILEGE_COUNT  : SInst<"svwhilege_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNo
 def SVWHILEGT_COUNT  : SInst<"svwhilegt_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilegt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
 def SVWHILELE_COUNT  : SInst<"svwhilele_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilele_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
 def SVWHILELT_COUNT  : SInst<"svwhilelt_{d}[_{1}]",  "}lli", "QcQsQiQl", MergeNone, "aarch64_sve_whilelt_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELO_COUNT  : SInst<"svwhilelo_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilelo_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILELS_COUNT  : SInst<"svwhilels_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilels_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILEHI_COUNT  : SInst<"svwhilehi_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehi_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
-def SVWHILEHS_COUNT  : SInst<"svwhilehs_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehs_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELO_COUNT  : SInst<"svwhilelt_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilelo_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILELS_COUNT  : SInst<"svwhilele_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilels_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEHI_COUNT  : SInst<"svwhilegt_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehi_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
+def SVWHILEHS_COUNT  : SInst<"svwhilege_{d}[_{1}]",  "}nni", "QcQsQiQl", MergeNone, "aarch64_sve_whilehs_{d}", [IsOverloadNone], [ImmCheck<2, ImmCheck2_4_Mul2>]>;
 
 def SVLD1B_X2 : MInst<"svld1[_{2}]_x2", "2}c", "cUc", [IsStructLoad], MemEltTyDefault, "aarch64_sve_ld1_pn_x2">;
 def SVLD1H_X2 : MInst<"svld1[_{2}]_x2", "2}c", "sUshb", [IsStructLoad], MemEltTyDefault, "aarch64_sve_ld1_pn_x2">;
diff --git a/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c b/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
index 08c1ee949c1116..5ba35d05fe7dbe 100644
--- a/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
+++ b/clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c
@@ -276,7 +276,7 @@ svcount_t test_svwhilegt_c64_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilehi_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c8,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c8_vl4(
@@ -291,7 +291,7 @@ svcount_t test_svwhilehi_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c8,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c16_vl2(
@@ -306,7 +306,7 @@ svcount_t test_svwhilehi_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c16,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c16_vl4(
@@ -321,7 +321,7 @@ svcount_t test_svwhilehi_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c16,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c32_vl2(
@@ -336,7 +336,7 @@ svcount_t test_svwhilehi_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c32,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c32_vl4(
@@ -351,7 +351,7 @@ svcount_t test_svwhilehi_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c32,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c64_vl2(
@@ -366,7 +366,7 @@ svcount_t test_svwhilehi_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c64,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilegt_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehi_c64_vl4(
@@ -381,7 +381,7 @@ svcount_t test_svwhilehi_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehi_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehi_c64,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilegt_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -399,7 +399,7 @@ svcount_t test_svwhilehi_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c8,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c8_vl4(
@@ -414,7 +414,7 @@ svcount_t test_svwhilehs_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c8,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c16_vl2(
@@ -429,7 +429,7 @@ svcount_t test_svwhilehs_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c16,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c16_vl4(
@@ -444,7 +444,7 @@ svcount_t test_svwhilehs_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c16,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c32_vl2(
@@ -459,7 +459,7 @@ svcount_t test_svwhilehs_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c32,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c32_vl4(
@@ -474,7 +474,7 @@ svcount_t test_svwhilehs_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c32,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c64_vl2(
@@ -489,7 +489,7 @@ svcount_t test_svwhilehs_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c64,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilege_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilehs_c64_vl4(
@@ -504,7 +504,7 @@ svcount_t test_svwhilehs_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilehs_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilehs_c64,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilege_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -645,7 +645,7 @@ svcount_t test_svwhilele_c64_vl4(int64_t op1, int64_t op2)
 //
 svcount_t test_svwhilelo_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c8,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c8_vl4(
@@ -660,7 +660,7 @@ svcount_t test_svwhilelo_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c8,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c16_vl2(
@@ -675,7 +675,7 @@ svcount_t test_svwhilelo_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c16,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c16_vl4(
@@ -690,7 +690,7 @@ svcount_t test_svwhilelo_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c16,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c32_vl2(
@@ -705,7 +705,7 @@ svcount_t test_svwhilelo_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c32,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c32_vl4(
@@ -720,7 +720,7 @@ svcount_t test_svwhilelo_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c32,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c64_vl2(
@@ -735,7 +735,7 @@ svcount_t test_svwhilelo_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c64,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilelt_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilelo_c64_vl4(
@@ -750,7 +750,7 @@ svcount_t test_svwhilelo_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilelo_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilelo_c64,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilelt_c64,_u64)(op1, op2, 4);
 }
 
 
@@ -768,7 +768,7 @@ svcount_t test_svwhilelo_c64_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c8_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c8,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c8,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c8_vl4(
@@ -783,7 +783,7 @@ svcount_t test_svwhilels_c8_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c8_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c8,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c8,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c16_vl2(
@@ -798,7 +798,7 @@ svcount_t test_svwhilels_c8_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c16_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c16,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c16,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c16_vl4(
@@ -813,7 +813,7 @@ svcount_t test_svwhilels_c16_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c16_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c16,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c16,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c32_vl2(
@@ -828,7 +828,7 @@ svcount_t test_svwhilels_c16_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c32_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c32,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c32,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c32_vl4(
@@ -843,7 +843,7 @@ svcount_t test_svwhilels_c32_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c32_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c32,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c32,_u64)(op1, op2, 4);
 }
 
 // CHECK-LABEL: @test_svwhilels_c64_vl2(
@@ -858,7 +858,7 @@ svcount_t test_svwhilels_c32_vl4(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c64_vl2(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c64,_u64)(op1, op2, 2);
+  return SVE_ACLE_FUNC(svwhilele_c64,_u64)(op1, op2, 2);
 }
 
 // CHECK-LABEL: @test_svwhilels_c64_vl4(
@@ -873,7 +873,7 @@ svcount_t test_svwhilels_c64_vl2(uint64_t op1, uint64_t op2)
 //
 svcount_t test_svwhilels_c64_vl4(uint64_t op1, uint64_t op2)
 {
-  return SVE_ACLE_FUNC(svwhilels_c64,_u64)(op1, op2, 4);
+  return SVE_ACLE_FUNC(svwhilele_c64,_u64)(op1, op2, 4);
 }
 
 

>From 3406e10bac69bd3d091bca6aa368f646fb4506e8 Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Wed, 13 Dec 2023 17:17:53 +0000
Subject: [PATCH 3/3] [fixup] Update a test to not use the old names and
 enabled it

Some stray copy/pasting resulted in a non-executing test
---
 .../acle_sve2p1_imm.cpp                       | 103 +++++++++---------
 1 file changed, 53 insertions(+), 50 deletions(-)

diff --git a/clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp b/clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp
index f90ae0fb50e5fc..a3ec4c5b8b1bc7 100644
--- a/clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp
+++ b/clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sve2p1_imm.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple aarch14-none-linux-gnu -target-feature +sve2p1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -fsyntax-only -verify %s
 
-// REQUIRES: aarch14-registered-target
+// REQUIRES: aarch64-registered-target
 
 #include <arm_sve.h>
 void test_svpext_lane_imm_0_3(svcount_t c) {
@@ -27,7 +27,43 @@ void test_svpext_lane_x2_imm_0_1(svcount_t c) {
   svpext_lane_c64_x2(c, 2); // expected-error {{argument value 2 is outside the valid range [0, 1]}}
 }
 
-svcount_t test_svwhile_pn(int64_t op1, int64_t op2) {
+svcount_t test_svwhile_pn_signed(int64_t op1, int64_t op2) {
+  svwhilege_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilege_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilege_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilege_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilegt_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilegt_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilegt_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilegt_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilele_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilele_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilele_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilele_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilelt_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilelt_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilelt_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+  svwhilelt_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
+
+  svwhilege_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
+  svwhilege_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilege_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilege_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilegt_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
+  svwhilegt_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilegt_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilegt_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilele_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
+  svwhilele_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilele_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilele_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilelt_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
+  svwhilelt_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilelt_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+  svwhilelt_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
+}
+
+svcount_t test_svwhile_pn_unsigned(uint64_t op1, uint64_t op2) {
   svwhilege_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilege_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilege_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
@@ -36,26 +72,10 @@ svcount_t test_svwhile_pn(int64_t op1, int64_t op2) {
   svwhilegt_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilegt_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilegt_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehi_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehi_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehi_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehi_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehs_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehs_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehs_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilehs_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilele_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilele_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilele_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilele_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilelo_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilelo_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilelo_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilelo_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilels_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilels_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilels_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
-  svwhilels_c64(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilelt_c8(op1, op2, 6);  // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilelt_c16(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
   svwhilelt_c32(op1, op2, 6); // expected-error {{argument value 6 is outside the valid range [2, 4]}}
@@ -69,26 +89,10 @@ svcount_t test_svwhile_pn(int64_t op1, int64_t op2) {
   svwhilegt_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilegt_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilegt_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehi_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
-  svwhilehi_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehi_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehi_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehs_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
-  svwhilehs_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehs_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilehs_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilele_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
   svwhilele_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilele_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilele_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilelo_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
-  svwhilelo_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilelo_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilelo_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilels_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
-  svwhilels_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilels_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
-  svwhilels_c64(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilelt_c8(op1, op2, 3);  // expected-error {{argument should be a multiple of 2}}
   svwhilelt_c16(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
   svwhilelt_c32(op1, op2, 3); // expected-error {{argument should be a multiple of 2}}
@@ -97,21 +101,19 @@ svcount_t test_svwhile_pn(int64_t op1, int64_t op2) {
 
 void test_cntp(svcount_t c) {
   svcntp_c8(c, 1);  // expected-error {{argument value 1 is outside the valid range [2, 4]}}
-  svcntp_c11(c, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
+  svcntp_c16(c, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
   svcntp_c32(c, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
-  svcntp_c14(c, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
+  svcntp_c64(c, 1); // expected-error {{argument value 1 is outside the valid range [2, 4]}}
 
   svcntp_c8(c, 3);  // expected-error {{argument should be a multiple of 2}}
-  svcntp_c11(c, 3); // expected-error {{argument should be a multiple of 2}}
+  svcntp_c16(c, 3); // expected-error {{argument should be a multiple of 2}}
   svcntp_c32(c, 3); // expected-error {{argument should be a multiple of 2}}
-  svcntp_c14(c, 3); // expected-error {{argument should be a multiple of 2}}
+  svcntp_c64(c, 3); // expected-error {{argument should be a multiple of 2}}
 }
 
+
 void test_svdot_lane_2way(svint32_t s32, svuint32_t u32, svint16_t s16, svuint16_t u16,
                           svfloat32_t f32, svfloat16_t f16) {
-  svdot_lane_s32_s16_s16(s32, s16, s16, 1); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
-  svdot_lane_u32_u16_u16(u32, u16, u16, 1); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
-  svdot_lane_f32_f16_f16(f32, f16, f16, 1); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
   svdot_lane_s32_s16_s16(s32, s16, s16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
   svdot_lane_u32_u16_u16(u32, u16, u16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
   svdot_lane_f32_f16_f16(f32, f16, f16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
@@ -124,8 +126,8 @@ void test_svbfml_lane(svbfloat16_t zda, svbfloat16_t zn, svbfloat16_t zm, uint64
   svmla_lane_bf16(zda, zn, zm, 8);  // expected-error {{argument value 8 is outside the valid range [0, 7]}}
   svmls_lane_bf16(zda, zn, zm, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
   svmls_lane_bf16(zda, zn, zm, 8);  // expected-error {{argument value 8 is outside the valid range [0, 7]}}
-  svmla_lane_bf16(zda, zn, zm, idx); // expected-errcor {{argument to 'svmla_lane_bf16' must be a constant integer}}
-  svmls_lane_bf16(zda, zn, zm, idx);  // expected-error {{argument to 'svmla_lane_bf16' must be a constant integer}}
+  svmla_lane_bf16(zda, zn, zm, idx); // expected-error {{argument to 'svmla_lane_bf16' must be a constant integer}}
+  svmls_lane_bf16(zda, zn, zm, idx);  // expected-error {{argument to 'svmls_lane_bf16' must be a constant integer}}
 }
 
 __attribute__((target("+sve2p1+b16b16")))
@@ -133,6 +135,7 @@ void test_svbfmul_lane(svbfloat16_t zn, svbfloat16_t zm, uint64_t idx){
   svmul_lane_bf16(zn, zm, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
   svmul_lane_bf16(zn, zm, 8);  // expected-error {{argument value 8 is outside the valid range [0, 7]}}
   svmul_lane_bf16(zn, zm, idx);  // expected-error {{argument to 'svmul_lane_bf16' must be a constant integer}}
+}
 
 __attribute__((target("+sve2p1")))
 void test_svextq_lane(svint16_t zn_i16, svint16_t zm_i16, svfloat16_t zn_f16, svfloat16_t zm_f16){
@@ -148,10 +151,10 @@ void test_svpmov_lane(){
   svuint64_t zn_u64;
   svbool_t pn;
 
-  svpmov_lane_u8(zn_u8, -1); // expected-error {{argument value -1 is outside the valid range [0, 0]}}
-  svpmov_lane_u16(zn_u16, -1); // expected-error {{argument value -1 is outside the valid range [0, 1]}}
-  svpmov_lane_u32(zn_u32, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
-  svpmov_lane_u64(zn_u64, -1); // expected-error {{argument value -1 is outside the valid range [0, 7]}}
+  svpmov_lane_u8(zn_u8, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 0]}}
+  svpmov_lane_u16(zn_u16, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 1]}}
+  svpmov_lane_u32(zn_u32, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
+  svpmov_lane_u64(zn_u64, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 7]}}
 
   svpmov_lane_u8(zn_u8, 1); // expected-error {{argument value 1 is outside the valid range [0, 0]}}
   svpmov_lane_u16(zn_u16, 3); // expected-error {{argument value 3 is outside the valid range [0, 1]}}
@@ -180,8 +183,8 @@ void test_svget_svset_b(uint64_t idx, svboolx2_t tuple2, svboolx4_t tuple4, svbo
   svget4(tuple4, -1); // expected-error {{argument value 18446744073709551615 is outside the valid range [0, 3]}}
   svget4(tuple4,  4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
 
-  svset2(tuple2, idx, res); // expected-error {{argument to 'svste2' must be a constant integer}}
-  svset4(tupl4, idx, res); // expected-error {{argument to 'svset4' must be a constant integer}}
+  svset2(tuple2, idx, res); // expected-error {{argument to 'svset2' must be a constant integer}}
+  svset4(tuple4, idx, res); // expected-error {{argument to 'svset4' must be a constant integer}}
   svget2(tuple2, idx); // expected-error {{argument to 'svget2' must be a constant integer}}
   svget4(tuple4, idx); // expected-error {{argument to 'svget4' must be a constant integer}}
 }



More information about the cfe-commits mailing list