-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[RISCV] Assign separate PseudoVSHA2MS_VV opcodes for each SEW #114317
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
mshockwave
merged 2 commits into
llvm:main
from
mshockwave:patch/rvv/split-vsha2ms-sched-class
Oct 31, 2024
Merged
Changes from 1 commit
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -274,9 +274,11 @@ multiclass VPseudoBinaryNoMaskPolicy_Zvk<VReg RetClass, | |
| multiclass VPseudoTernaryNoMask_Zvk<VReg RetClass, | ||
| VReg Op1Class, | ||
| DAGOperand Op2Class, | ||
| LMULInfo MInfo> { | ||
| let VLMul = MInfo.value in | ||
| def "_" # MInfo.MX : VPseudoTernaryNoMask_Zvk<RetClass, Op1Class, Op2Class>; | ||
| LMULInfo MInfo, int sew = 0> { | ||
| let VLMul = MInfo.value, SEW = sew in { | ||
| defvar suffix = !if(sew, "_" # MInfo.MX # "_E" # sew, "_" # MInfo.MX); | ||
| def suffix : VPseudoTernaryNoMask_Zvk<RetClass, Op1Class, Op2Class>; | ||
| } | ||
| } | ||
|
|
||
| multiclass VPseudoBinaryV_V_NoMask_Zvk<LMULInfo m> { | ||
|
|
@@ -348,12 +350,12 @@ multiclass VPseudoVSHA2CL { | |
| } | ||
| } | ||
|
|
||
| multiclass VPseudoVSHA2MS { | ||
| foreach m = MxListVF4 in { | ||
| multiclass VPseudoVSHA2MS<int sew = 0> { | ||
| foreach m = !if(!eq(sew, 64), MxListVF8, MxListVF4) in { | ||
| defvar mx = m.MX; | ||
| defm _VV : VPseudoTernaryNoMask_Zvk<m.vrclass, m.vrclass, m.vrclass, m>, | ||
| defm _VV : VPseudoTernaryNoMask_Zvk<m.vrclass, m.vrclass, m.vrclass, m, sew = sew>, | ||
| SchedTernary<"WriteVSHA2MSV", "ReadVSHA2MSV", "ReadVSHA2MSV", | ||
| "ReadVSHA2MSV", mx>; | ||
| "ReadVSHA2MSV", mx, sew>; | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -564,7 +566,9 @@ let Predicates = [HasStdExtZvkned] in { | |
| let Predicates = [HasStdExtZvknhaOrZvknhb] in { | ||
| defm PseudoVSHA2CH : VPseudoVSHA2CH; | ||
| defm PseudoVSHA2CL : VPseudoVSHA2CL; | ||
| defm PseudoVSHA2MS : VPseudoVSHA2MS; | ||
| defm PseudoVSHA2MS : VPseudoVSHA2MS<sew=32>; | ||
| let Predicates = [HasStdExtZvknhb] in | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one (line 570) wins. |
||
| defm PseudoVSHA2MS : VPseudoVSHA2MS<sew=64>; | ||
| } // Predicates = [HasStdExtZvknhaOrZvknhb] | ||
|
|
||
| let Predicates = [HasStdExtZvksed] in { | ||
|
|
@@ -944,12 +948,14 @@ multiclass VPatUnaryV_V_S_NoMask_Zvk<string intrinsic, string instruction, | |
| } | ||
|
|
||
| multiclass VPatBinaryV_VV_NoMask<string intrinsic, string instruction, | ||
| list<VTypeInfo> vtilist> { | ||
| list<VTypeInfo> vtilist, | ||
| bit isSEWAware = false> { | ||
| foreach vti = vtilist in | ||
| def : VPatTernaryNoMaskWithPolicy<intrinsic, instruction, "VV", | ||
| vti.Vector, vti.Vector, vti.Vector, | ||
| vti.Log2SEW, vti.LMul, vti.RegClass, | ||
| vti.RegClass, vti.RegClass>; | ||
| vti.RegClass, vti.RegClass, | ||
| sew_aware = isSEWAware>; | ||
| } | ||
|
|
||
| multiclass VPatBinaryV_VI_NoMask<string intrinsic, string instruction, | ||
|
|
@@ -1101,13 +1107,13 @@ let Predicates = [HasStdExtZvkned] in { | |
| let Predicates = [HasStdExtZvknha] in { | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ch", "PseudoVSHA2CH", I32IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2cl", "PseudoVSHA2CH", I32IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ms", "PseudoVSHA2MS", I32IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ms", "PseudoVSHA2MS", I32IntegerVectors, isSEWAware=true>; | ||
| } // Predicates = [HasStdExtZvknha] | ||
|
|
||
| let Predicates = [HasStdExtZvknhb] in { | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ch", "PseudoVSHA2CH", I32I64IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2cl", "PseudoVSHA2CH", I32I64IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ms", "PseudoVSHA2MS", I32I64IntegerVectors>; | ||
| defm : VPatBinaryV_VV_NoMask<"int_riscv_vsha2ms", "PseudoVSHA2MS", I32I64IntegerVectors, isSEWAware=true>; | ||
| } // Predicates = [HasStdExtZvknhb] | ||
|
|
||
| let Predicates = [HasStdExtZvksed] in { | ||
|
|
||
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
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.