forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][SME] Add intrinsics for vector groups ZERO (llvm#88114)
According to the specification in ARM-software/acle#309 this adds the intrinsics: ``` void svzero_za64_vg1x2(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg1x4(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg2x1(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg2x2(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg2x4(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg4x1(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg4x2(uint32_t slice) __arm_streaming __arm_inout("za"); void svzero_za64_vg4x4(uint32_t slice) __arm_streaming __arm_inout("za"); ```
- Loading branch information
Showing
5 changed files
with
391 additions
and
9 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
139 changes: 139 additions & 0 deletions
139
clang/test/CodeGen/aarch64-sme2p1-intrinsics/acle_sme2p1_zero.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 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 | ||
// REQUIRES: aarch64-registered-target | ||
|
||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2p1 -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s | ||
|
||
#include <arm_sme.h> | ||
|
||
#define SVE_ACLE_FUNC(A1,A2) A1##A2 | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg1x2( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0:[0-9]+]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg1x2(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg1x2j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0:[0-9]+]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg1x2(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg1x2(uint32_t slice) __arm_streaming __arm_inout("za") | ||
{ | ||
SVE_ACLE_FUNC(svzero_za64,_vg1x2)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg1x4( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg1x4(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg1x4j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg1x4(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg1x4(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg1x4)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg2x1( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x1(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg2x1j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x1(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg2x1(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg2x1)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg2x2( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x2(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg2x2j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x2(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg2x2(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg2x2)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg2x4( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x4(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg2x4j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg2x4(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg2x4(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg2x4)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg4x1( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x1(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg4x1j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x1(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg4x1(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg4x1)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg4x2( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x2(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg4x2j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x2(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg4x2(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg4x2)(slice); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local void @test_svzero_za64_vg4x4( | ||
// CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x4(i32 [[SLICE]]) | ||
// CHECK-NEXT: ret void | ||
// | ||
// CPP-CHECK-LABEL: define dso_local void @_Z22test_svzero_za64_vg4x4j( | ||
// CPP-CHECK-SAME: i32 noundef [[SLICE:%.*]]) #[[ATTR0]] { | ||
// CPP-CHECK-NEXT: entry: | ||
// CPP-CHECK-NEXT: tail call void @llvm.aarch64.sme.zero.za64.vg4x4(i32 [[SLICE]]) | ||
// CPP-CHECK-NEXT: ret void | ||
// | ||
void test_svzero_za64_vg4x4(uint32_t slice) __arm_streaming __arm_inout("za"){ | ||
SVE_ACLE_FUNC(svzero_za64,_vg4x4)(slice); | ||
} |
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
Oops, something went wrong.