-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[X86][AVX10.2] Map vector saturated converts to public intrinsics #121483
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
phoebewang
merged 11 commits into
llvm:main
from
JaydeepChauhan14:mapsatconvtopublicintrinsic
Jan 5, 2025
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
491755c
Map vector saturated converts to public intrinsics
JaydeepChauhan14 a176e69
Merge branch 'main' into mapsatconvtopublicintrinsic
JaydeepChauhan14 a51c29d
Addressed the review comments1
JaydeepChauhan14 91d2f89
Merge branch 'main' into mapsatconvtopublicintrinsic
JaydeepChauhan14 94234cb
Addressed the review comments2
JaydeepChauhan14 a04f76c
Merge branch 'main' into mapsatconvtopublicintrinsic
JaydeepChauhan14 2a5149b
Addressed the review comments3
JaydeepChauhan14 5115f34
Merge branch 'main' into mapsatconvtopublicintrinsic
JaydeepChauhan14 cb0ddf3
Fixed the undef issue
JaydeepChauhan14 430f655
Merge branch 'main' into mapsatconvtopublicintrinsic
JaydeepChauhan14 b3a52f1
Fixed return
JaydeepChauhan14 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
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
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,122 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple=i686-linux -mattr=+avx10.2-512 | FileCheck %s --check-prefix=X86 | ||
; RUN: llc < %s -mtriple=x86_64-linux -mattr=+avx10.2-512 | FileCheck %s --check-prefix=X64 | ||
JaydeepChauhan14 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
; VCVTTPD2DQS | ||
define <8 x i32> @test_signed_v8i32_v8f64(<8 x double> %f) nounwind { | ||
; X86-LABEL: test_signed_v8i32_v8f64: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttpd2dqs %zmm0, %ymm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_signed_v8i32_v8f64: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttpd2dqs %zmm0, %ymm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i32> @llvm.fptosi.sat.v8i32.v8f64(<8 x double> %f) | ||
ret <8 x i32> %x | ||
} | ||
|
||
; VCVTTPD2QQS | ||
define <8 x i64> @test_signed_v8i64_v8f64(<8 x double> %f) nounwind { | ||
; X86-LABEL: test_signed_v8i64_v8f64: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttpd2qqs %zmm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_signed_v8i64_v8f64: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttpd2qqs %zmm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i64> @llvm.fptosi.sat.v8i64.v8f64(<8 x double> %f) | ||
ret <8 x i64> %x | ||
} | ||
|
||
; VCVTTPD2UDQS | ||
define <8 x i32> @test_unsigned_v8i32_v8f64(<8 x double> %f) nounwind { | ||
; X86-LABEL: test_unsigned_v8i32_v8f64: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttpd2udqs %zmm0, %ymm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_unsigned_v8i32_v8f64: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttpd2udqs %zmm0, %ymm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i32> @llvm.fptoui.sat.v8i32.v8f64(<8 x double> %f) | ||
ret <8 x i32> %x | ||
} | ||
|
||
; VCVTTPD2UQQS | ||
define <8 x i64> @test_unsigned_v8i64_v8f64(<8 x double> %f) nounwind { | ||
; X86-LABEL: test_unsigned_v8i64_v8f64: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttpd2uqqs %zmm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_unsigned_v8i64_v8f64: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttpd2uqqs %zmm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i64> @llvm.fptoui.sat.v8i64.v8f64(<8 x double> %f) | ||
ret <8 x i64> %x | ||
} | ||
|
||
; VCVTTPS2DQS | ||
define <16 x i32> @test_signed_v16i32_v16f32(<16 x float> %f) nounwind { | ||
; X86-LABEL: test_signed_v16i32_v16f32: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttps2dqs %zmm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_signed_v16i32_v16f32: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttps2dqs %zmm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <16 x i32> @llvm.fptosi.sat.v16i32.v16f32(<16 x float> %f) | ||
ret <16 x i32> %x | ||
} | ||
|
||
; VCVTTPS2UDQS | ||
define <16 x i32> @test_unsigned_v16i32_v16f32(<16 x float> %f) nounwind { | ||
; X86-LABEL: test_unsigned_v16i32_v16f32: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttps2udqs %zmm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_unsigned_v16i32_v16f32: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttps2udqs %zmm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <16 x i32> @llvm.fptoui.sat.v16i32.v16f32(<16 x float> %f) | ||
ret <16 x i32> %x | ||
} | ||
; VCVTTPS2QQS | ||
define <8 x i64> @test_signed_v8i64_v8f32(<8 x float> %f) nounwind { | ||
; X86-LABEL: test_signed_v8i64_v8f32: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttps2qqs %ymm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_signed_v8i64_v8f32: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttps2qqs %ymm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i64> @llvm.fptosi.sat.v8i64.v8f32(<8 x float> %f) | ||
ret <8 x i64> %x | ||
} | ||
|
||
; VCVTTPS2UQQS | ||
define <8 x i64> @test_unsigned_v8i64_v8f32(<8 x float> %f) nounwind { | ||
; X86-LABEL: test_unsigned_v8i64_v8f32: | ||
; X86: # %bb.0: | ||
; X86-NEXT: vcvttps2uqqs %ymm0, %zmm0 | ||
; X86-NEXT: retl | ||
; | ||
; X64-LABEL: test_unsigned_v8i64_v8f32: | ||
; X64: # %bb.0: | ||
; X64-NEXT: vcvttps2uqqs %ymm0, %zmm0 | ||
; X64-NEXT: retq | ||
%x = call <8 x i64> @llvm.fptoui.sat.v8i64.v8f32(<8 x float> %f) | ||
ret <8 x i64> %x | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.