-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[LangRef][IR] Add 3-way compare intrinsics llvm.scmp/llvm.ucmp #83227
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
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9d7134f
add sthreecmp and uthreecmp intrinsics to LangRef
miguelraz 57ec729
add tablegen for sthreecmp and usthreecmp intrinsics
miguelraz 34c0531
typo fix unsigned integer for uthreecmp
miguelraz fc62757
add sthreecmp and uthreecmp intrinsics modeled after llvm.smax
miguelraz a8ee078
add int_sthreecmp and int_uthreecmp based on int_smin
miguelraz ef5bd69
add [u]sthreecmp to ValueTrackingTest.cpp
miguelraz 2ba679d
call three way cmp intrinsic [u]scmp in LangRef
miguelraz c605cdf
only add minimum stuff to LangRef and Intrinsics.td for s/ucmp
miguelraz 294822f
add u/scmp result type overload over a fixed type in Intrinsics.td
miguelraz 7651b2e
add VisitIntrinsicCall cases for Intrinsic::ucmp/scmp
miguelraz a4fe31d
Update llvm/lib/IR/Verifier.cpp
miguelraz cdf4abf
add proper type overloads for llvm.ucmp.i2.i32 and llvm.scmp.i2.i32 i…
miguelraz e50721f
Merge branch 'spaceship-intrinsic' of github.com:miguelraz/llvm-proje…
miguelraz ae6910f
move isVector check above else to catch dest as scalar but src as vector
miguelraz d68cf0d
omit checks done by Intrinsics.td on u/scmp operating on int-likes
miguelraz 7b3cfee
Update llvm/docs/LangRef.rst
miguelraz 3a0ee32
Update llvm/docs/LangRef.rst
miguelraz 343daf4
Update llvm/docs/LangRef.rst
miguelraz 4cd70d6
Update llvm/lib/IR/Verifier.cpp
miguelraz c8b5e02
Update llvm/lib/IR/Verifier.cpp
miguelraz a86c4a0
delete stray newline
miguelraz f887988
cast to vectors (not arrays!) in scmp Check
miguelraz d6d0a27
add Filecheck tests for Verifier.cpp u/scmp intrinsics
miguelraz 4f91e51
delete last unneded CHECK
miguelraz 38e94c5
make return value length more simple on scmp and ucmp
miguelraz 915ead2
make return value length more simple on scmp and ucmp
miguelraz 266894c
Update llvm/docs/LangRef.rst
miguelraz 0d988d5
Update llvm/docs/LangRef.rst
miguelraz 045d385
Update llvm/docs/LangRef.rst
miguelraz 45ccd00
Update llvm/docs/LangRef.rst
miguelraz 2666817
Update llvm/lib/IR/Verifier.cpp
miguelraz fbfdea3
fix CodingStandards for var casenames and 4 spaces not tabs in FileCh…
miguelraz 04c220b
Update llvm/test/Verifier/intrinsic-cmp.ll
miguelraz 0f5d306
align to 2 spaces
miguelraz d5e7146
fixup unit tests for scmp intrinsic
miguelraz 94c853d
appease the formatting gods
miguelraz f09c3e4
appease the formatting gods, again
miguelraz a85ae26
appease the formatting gods, again, again
miguelraz 9aaab2c
appease the formatting gods, again, again, again
miguelraz 8005996
appease the FileCheck gods \o/
miguelraz 4caa63e
phrasing nits for error messages
miguelraz b0918f6
update FileCheck unit tests with most recent errors
miguelraz 74c9bb3
freakin' formatting gods
miguelraz 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; RUN: not opt -S -passes=verify 2>&1 < %s | FileCheck %s | ||
|
||
define void @matching_vector_lens(<4 x i32> %arg1, <4 x i32> %arg2) { | ||
; CHECK: return type and arguments must have the same number of elements | ||
%res = call <8 x i32> @llvm.scmp.v8i32.v4i32(<4 x i32> %arg1, <4 x i32> %arg2) | ||
ret void | ||
} | ||
|
||
define void @result_len_is_at_least_2bits_wide(i32 %arg1, i32 %arg2) { | ||
; CHECK: result type must be at least 2 bits wide | ||
%res2 = call i1 @llvm.scmp.i1.i32(i32 %arg1, i32 %arg2) | ||
ret void | ||
} | ||
|
||
define void @both_args_are_vecs_or_neither(<4 x i32> %arg1, i32 %arg2) { | ||
; CHECK: ucmp/scmp argument and result types must both be either vector or scalar types | ||
%res3 = call i2 @llvm.scmp.i2.v4i32(<4 x i32> %arg1, <4 x i32> %arg1) | ||
; CHECK: ucmp/scmp argument and result types must both be either vector or scalar types | ||
%res4 = call <4 x i32> @llvm.scmp.v4i32.i32(i32 %arg2, i32 %arg2) | ||
ret void | ||
} | ||
|
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.