Legalize v32i1 and make use of pext in haswell - #19
Open
laishzh wants to merge 6 commits into
Open
Conversation
…CAST from v32i1 to i32
…1 to i32 available
Open
Contributor
|
How do we test this code? @laishzh |
Author
|
We can follow llvm's testing guide, using the Regression Tests. In your project, you have renamed the llc to llc-3.4, so one error will occur when you |
Contributor
|
I mean, how can we know that the code you changed have taken effect? Can we just write some simple LLVM IR to test it? |
Contributor
There was a problem hiding this comment.
What is the default operation type for a type, Legal, Expand, or Custom?
What if this line is not added?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goal
I am working on legalizing type v32i1, and transforming vector_shuffle into pext operation in some specific masks.
How
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v32i1, Custom);If you want to use the
Customaction, you need to check whether theLowerOperationfunction can support for the operation.LowerVECTOR_SHUFFLEto generate new node for the specific masks.In some cases, need to change the
assertions.Others
I just write a
VR32forv32i1instead of usingGR32directly, so that thedef : Pat <(i32 (bitconvert (v32i1 VR32:$src))), (i32 VR32:$src)>;can be compiled successfully.