-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and sv…
…cnt[bhwd]_pat Add the IsOverloadNone flag to tell CGBuiltin that it does not have an overloaded type. This is used for e.g. svpfalse which does not take any arguments and always returns a svbool_t. This patch also adds builtins for svcntb_pat, svcnth_pat, svcntw_pat and svcntd_pat, as those don't require custom codegen. Reviewers: SjoerdMeijer, efriedma, rovka Reviewed By: efriedma Tags: #clang Differential Revision: https://reviews.llvm.org/D77596
- Loading branch information
1 parent
1b6b05a
commit 662cbaf
Showing
10 changed files
with
665 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 139 additions & 0 deletions
139
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_cntb.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// RUN: %clang_cc1 -D__ARM_FEATURE_SVE -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s | ||
|
||
#include <arm_sve.h> | ||
|
||
uint64_t test_svcntb_pat() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 0) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_POW2); | ||
} | ||
|
||
uint64_t test_svcntb_pat_1() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_1 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 1) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL1); | ||
} | ||
|
||
uint64_t test_svcntb_pat_2() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_2 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 2) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL2); | ||
} | ||
|
||
uint64_t test_svcntb_pat_3() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_3 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 3) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL3); | ||
} | ||
|
||
uint64_t test_svcntb_pat_4() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_4 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 4) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL4); | ||
} | ||
|
||
uint64_t test_svcntb_pat_5() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_5 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 5) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL5); | ||
} | ||
|
||
uint64_t test_svcntb_pat_6() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_6 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 6) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL6); | ||
} | ||
|
||
uint64_t test_svcntb_pat_7() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_7 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 7) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL7); | ||
} | ||
|
||
uint64_t test_svcntb_pat_8() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_8 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 8) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL8); | ||
} | ||
|
||
uint64_t test_svcntb_pat_9() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_9 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 9) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL16); | ||
} | ||
|
||
uint64_t test_svcntb_pat_10() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_10 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 10) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL32); | ||
} | ||
|
||
uint64_t test_svcntb_pat_11() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_11 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 11) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL64); | ||
} | ||
|
||
uint64_t test_svcntb_pat_12() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_12 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 12) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL128); | ||
} | ||
|
||
uint64_t test_svcntb_pat_13() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_13 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 13) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_VL256); | ||
} | ||
|
||
uint64_t test_svcntb_pat_14() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_14 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 29) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_MUL4); | ||
} | ||
|
||
uint64_t test_svcntb_pat_15() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_15 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 30) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_MUL3); | ||
} | ||
|
||
uint64_t test_svcntb_pat_16() | ||
{ | ||
// CHECK-LABEL: test_svcntb_pat_16 | ||
// CHECK: %[[INTRINSIC:.*]] = call i64 @llvm.aarch64.sve.cntb(i32 31) | ||
// CHECK: ret i64 %[[INTRINSIC]] | ||
return svcntb_pat(SV_ALL); | ||
} |
Oops, something went wrong.