Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SveEmitter] Add builtins for FFR manipulation
This patch adds builtins for: - svrdffr, svrdffr_z - svsetffr - svwrffr
- Loading branch information
1 parent
91cb13f
commit ac894a5
Showing
4 changed files
with
49 additions
and
0 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
19 changes: 19 additions & 0 deletions
19
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_rdffr.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,19 @@ | ||
// 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> | ||
|
||
svbool_t test_svrdffr() | ||
{ | ||
// CHECK-LABEL: test_svrdffr | ||
// CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr() | ||
// CHECK: ret <vscale x 16 x i1> %[[INTRINSIC]] | ||
return svrdffr(); | ||
} | ||
|
||
svbool_t test_svrdffr_z(svbool_t pg) | ||
{ | ||
// CHECK-LABEL: test_svrdffr_z | ||
// CHECK: %[[INTRINSIC:.*]] = call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> %pg) | ||
// CHECK: ret <vscale x 16 x i1> %[[INTRINSIC]] | ||
return svrdffr_z(pg); | ||
} |
11 changes: 11 additions & 0 deletions
11
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_setffr.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,11 @@ | ||
// 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> | ||
|
||
void test_svsetffr() | ||
{ | ||
// CHECK-LABEL: test_svsetffr | ||
// CHECK: call void @llvm.aarch64.sve.setffr() | ||
// CHECK: ret void | ||
svsetffr(); | ||
} |
11 changes: 11 additions & 0 deletions
11
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_wrffr.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,11 @@ | ||
// 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> | ||
|
||
void test_svwrffr(svbool_t op) | ||
{ | ||
// CHECK-LABEL: test_svwrffr | ||
// CHECK: call void @llvm.aarch64.sve.wrffr(<vscale x 16 x i1> %op) | ||
// CHECK: ret void | ||
svwrffr(op); | ||
} |