Skip to content

[Clang][SVE2.1] Update names of the svwhileXX builtins with predicate-as-counter #75200

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 4 commits into from
Dec 18, 2023

Conversation

momchil-velikov
Copy link
Collaborator

@momchil-velikov momchil-velikov commented Dec 12, 2023

The _s64/_u64 part can be omitted now and the name variants do not include
unsigned comparison mnemonics. Both are inferred from the argument types.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Dec 12, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 12, 2023

@llvm/pr-subscribers-clang

Author: Momchil Velikov (momchil-velikov)

Changes

The _s64/_u64 part can be omitted now. It's inferred from the argument types.


Patch is 22.35 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/75200.diff

2 Files Affected:

  • (modified) clang/include/clang/Basic/arm_sve.td (+8-8)
  • (modified) clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_while_pn.c (+72-64)
diff --git a/clang/include/clang/Basic/arm_sve.td b/clang/include/clang/Basic/arm_sve.td
index 85656c00c5b3eb..f24c9ef7491f16 100644
--- a/clang/include/clang/Basic/arm_sve.td
+++ b/clang/include/clang/Basic/arm_sve.td
@@ -1946,14 +1946,14 @@ def SVPSEL_COUNT_ALIAS_H : SInst<"svpsel_lane_c16", "}}Pm", "Ps", MergeNone, "",
 def SVPSEL_COUNT_ALIAS_S : SInst<"svpsel_lane_c32", "}}Pm", "Pi", MergeNone, "", [], []>;
 def SVPSEL_COUNT_ALIAS_D : SInst<"svpsel_lane_c64", "}}Pm", "Pl", MergeNone, "", [], []>;
 
-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_svwh...
[truncated]

Copy link
Collaborator

@sdesmalen-arm sdesmalen-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…uiltins with predicate-as-counter

The `_s64`/`_u64` part can be omitted now. It's inferred from
the argument types.
…iants

The kind of comparison is derived from argument types.
Some stray copy/pasting resulted in a non-executing test
@momchil-velikov momchil-velikov changed the title [Clang][SVE2.1] Make a part of the name optional for svwhileXX builtins with predicate-as-counter [Clang][SVE2.1] Update names of the svwhileXX builtins with predicate-as-counter Dec 18, 2023
@momchil-velikov momchil-velikov merged commit 35a77fc into llvm:main Dec 18, 2023
@momchil-velikov momchil-velikov deleted the acle-whilexx-counter branch December 18, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants