-
Notifications
You must be signed in to change notification settings - Fork 17.2k
[AArch64] Add 9.7 CVT data processing intrinsics #186807
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
Open
MartinWehking
wants to merge
2
commits into
llvm:main
Choose a base branch
from
MartinWehking:data-intrinsics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
113 changes: 113 additions & 0 deletions
113
clang/test/CodeGen/AArch64/sve2p3-intrinsics/acle_sve2_fp_int_cvtn_x2.c
This file contains hidden or 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,113 @@ | ||
| // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py | ||
| // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2p3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s | ||
| // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2p3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK | ||
| // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2p3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s | ||
| // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2p3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK | ||
| // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2p3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s | ||
| // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2p3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK | ||
| // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sme -target-feature +sme2p3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s | ||
| // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sme -target-feature +sme2p3 -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 +sve -target-feature +sve2p3\ | ||
| // RUN: -S -disable-O0-optnone -Werror -Wall -o /dev/null %s | ||
| // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2p3\ | ||
| // RUN: -S -disable-O0-optnone -Werror -Wall -o /dev/null %s | ||
| // | ||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_sve.h> | ||
|
|
||
| #if defined __ARM_FEATURE_SME | ||
| #define MODE_ATTR __arm_streaming | ||
| #else | ||
| #define MODE_ATTR | ||
| #endif | ||
|
|
||
| #ifdef SVE_OVERLOADED_FORMS | ||
| #define SVE_ACLE_FUNC(A1,A2_UNUSED) A1 | ||
| #else | ||
| #define SVE_ACLE_FUNC(A1,A2) A1##A2 | ||
| #endif | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_s8_f16_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.fcvtzsn.x2.nxv16i8.nxv8f16(<vscale x 8 x half> [[ZN_COERCE0:%.*]], <vscale x 8 x half> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z22test_svcvtzn_s8_f16_x213svfloat16x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.fcvtzsn.x2.nxv16i8.nxv8f16(<vscale x 8 x half> [[ZN_COERCE0:%.*]], <vscale x 8 x half> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] | ||
| // | ||
| svint8_t test_svcvtzn_s8_f16_x2(svfloat16x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_s8,_f16_x2)(zn); | ||
| } | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_s16_f32_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzsn.x2.nxv8i16.nxv4f32(<vscale x 4 x float> [[ZN_COERCE0:%.*]], <vscale x 4 x float> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z23test_svcvtzn_s16_f32_x213svfloat32x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzsn.x2.nxv8i16.nxv4f32(<vscale x 4 x float> [[ZN_COERCE0:%.*]], <vscale x 4 x float> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]] | ||
| // | ||
| svint16_t test_svcvtzn_s16_f32_x2(svfloat32x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_s16,_f32_x2)(zn); | ||
| } | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_s32_f64_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzsn.x2.nxv4i32.nxv2f64(<vscale x 2 x double> [[ZN_COERCE0:%.*]], <vscale x 2 x double> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z23test_svcvtzn_s32_f64_x213svfloat64x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzsn.x2.nxv4i32.nxv2f64(<vscale x 2 x double> [[ZN_COERCE0:%.*]], <vscale x 2 x double> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]] | ||
| // | ||
| svint32_t test_svcvtzn_s32_f64_x2(svfloat64x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_s32,_f64_x2)(zn); | ||
| } | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_u8_f16_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.fcvtzun.x2.nxv16i8.nxv8f16(<vscale x 8 x half> [[ZN_COERCE0:%.*]], <vscale x 8 x half> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z22test_svcvtzn_u8_f16_x213svfloat16x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.fcvtzun.x2.nxv16i8.nxv8f16(<vscale x 8 x half> [[ZN_COERCE0:%.*]], <vscale x 8 x half> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 16 x i8> [[TMP0]] | ||
| // | ||
| svuint8_t test_svcvtzn_u8_f16_x2(svfloat16x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_u8,_f16_x2)(zn); | ||
| } | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_u16_f32_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzun.x2.nxv8i16.nxv4f32(<vscale x 4 x float> [[ZN_COERCE0:%.*]], <vscale x 4 x float> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z23test_svcvtzn_u16_f32_x213svfloat32x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 8 x i16> @llvm.aarch64.sve.fcvtzun.x2.nxv8i16.nxv4f32(<vscale x 4 x float> [[ZN_COERCE0:%.*]], <vscale x 4 x float> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 8 x i16> [[TMP0]] | ||
| // | ||
| svuint16_t test_svcvtzn_u16_f32_x2(svfloat32x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_u16,_f32_x2)(zn); | ||
| } | ||
|
|
||
| // CHECK-LABEL: @test_svcvtzn_u32_f64_x2( | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzun.x2.nxv4i32.nxv2f64(<vscale x 2 x double> [[ZN_COERCE0:%.*]], <vscale x 2 x double> [[ZN_COERCE1:%.*]]) | ||
| // CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]] | ||
| // | ||
| // CPP-CHECK-LABEL: @_Z23test_svcvtzn_u32_f64_x213svfloat64x2_t( | ||
| // CPP-CHECK-NEXT: entry: | ||
| // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.fcvtzun.x2.nxv4i32.nxv2f64(<vscale x 2 x double> [[ZN_COERCE0:%.*]], <vscale x 2 x double> [[ZN_COERCE1:%.*]]) | ||
| // CPP-CHECK-NEXT: ret <vscale x 4 x i32> [[TMP0]] | ||
| // | ||
| svuint32_t test_svcvtzn_u32_f64_x2(svfloat64x2_t zn) MODE_ATTR { | ||
| return SVE_ACLE_FUNC(svcvtzn_u32,_f64_x2)(zn); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToDo change this