- Notifications
You must be signed in to change notification settings - Fork 15.3k
[AMDGPU] Fix some MIR tests #66090
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
[AMDGPU] Fix some MIR tests #66090
Changes from all commits
Commits
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 |
|---|---|---|
| | @@ -113,7 +113,7 @@ body: | | |
| | ||
| # GCN-LABEL: name: test_madak_sgpr_src0_f32 | ||
| # GCN: %1:vgpr_32 = V_MOV_B32_e32 1078523331, implicit $exec | ||
| # GCN: %2:vgpr_32 = V_MAD_F32_e64 0, killed %0, 0, %1, 0, %3:vgpr_32, 0, 0, implicit $mode, implicit $exec | ||
| # GCN: %3:vgpr_32 = V_MAD_F32_e64 0, killed %0, 0, %1, 0, %2, 0, 0, implicit $mode, implicit $exec | ||
| | ||
| --- | ||
| name: test_madak_sgpr_src0_f32 | ||
| | @@ -127,14 +127,15 @@ body: | | |
| | ||
| %0 = IMPLICIT_DEF | ||
| %1 = V_MOV_B32_e32 1078523331, implicit $exec | ||
| %2 = V_MAC_F32_e32 killed %0, %1, %3, implicit $mode, implicit $exec | ||
| %2 = IMPLICIT_DEF | ||
| %3 = V_MAC_F32_e32 killed %0, %1, %2, implicit $mode, implicit $exec | ||
| | ||
| ... | ||
| | ||
| # This can still fold if this is an inline immediate. | ||
| | ||
| # GCN-LABEL: name: test_madak_inlineimm_src0_f32 | ||
| # GCN: %1:vgpr_32 = V_MADMK_F32 1073741824, 1078523331, %2:vgpr_32, implicit $mode, implicit $exec | ||
| # GCN: %2:vgpr_32 = V_MADMK_F32 1073741824, 1078523331, %1, implicit $mode, implicit $exec | ||
| | ||
| --- | ||
| name: test_madak_inlineimm_src0_f32 | ||
| | @@ -146,13 +147,14 @@ body: | | |
| bb.0: | ||
| | ||
| %0 = V_MOV_B32_e32 1078523331, implicit $exec | ||
| %1 = V_MAC_F32_e32 1073741824, %0, %2, implicit $mode, implicit $exec | ||
| %1 = IMPLICIT_DEF | ||
| %2 = V_MAC_F32_e32 1073741824, %0, %1, implicit $mode, implicit $exec | ||
| | ||
| ... | ||
| # Non-inline immediate uses constant bus already. | ||
| | ||
| # GCN-LABEL: name: test_madak_otherimm_src0_f32 | ||
| # GCN: %1:vgpr_32 = V_MADMK_F32 %0, 1120403456, %2:vgpr_32, implicit $mode, implicit $exec | ||
| # GCN: %2:vgpr_32 = V_MADMK_F32 %0, 1120403456, %1, implicit $mode, implicit $exec | ||
| | ||
| --- | ||
| name: test_madak_otherimm_src0_f32 | ||
| | @@ -164,13 +166,14 @@ body: | | |
| bb.0: | ||
| | ||
| %0 = V_MOV_B32_e32 1078523331, implicit $exec | ||
| %1 = V_MAC_F32_e32 1120403456, %0, %2, implicit $mode, implicit $exec | ||
| %1 = IMPLICIT_DEF | ||
| %2 = V_MAC_F32_e32 1120403456, %0, %1, implicit $mode, implicit $exec | ||
| | ||
| ... | ||
| # Non-inline immediate uses constant bus already. | ||
| | ||
| # GCN-LABEL: name: test_madak_other_constantlike_src0_f32 | ||
| # GCN: %1:vgpr_32 = V_MAC_F32_e32 %stack.0, %0, %1, implicit $mode, implicit $exec | ||
| # GCN: %2:vgpr_32 = V_MAC_F32_e32 %stack.0, %0, %2, implicit $mode, implicit $exec | ||
| --- | ||
| name: test_madak_other_constantlike_src0_f32 | ||
| registers: | ||
| | @@ -185,7 +188,8 @@ body: | | |
| bb.0: | ||
| | ||
| %0 = V_MOV_B32_e32 1078523331, implicit $exec | ||
| %1 = V_MAC_F32_e32 %stack.0, %0, %2, implicit $mode, implicit $exec | ||
| %1 = IMPLICIT_DEF | ||
| Contributor 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. IMPLICIT_DEF isn't really representative of running twoaddrs, which runs after ProcessImplicitDefs. Better to have an undef operand | ||
| %2 = V_MAC_F32_e32 %stack.0, %0, %1, implicit $mode, implicit $exec | ||
| | ||
| ... | ||
| | ||
| | @@ -194,12 +198,8 @@ body: | | |
| | ||
| --- | ||
| name: test_madak_inline_literal_f16 | ||
| liveins: | ||
| - { reg: '$vgpr0', virtual-reg: '%3' } | ||
| body: | | ||
| bb.0: | ||
| liveins: $vgpr0 | ||
| | ||
| %3:vgpr_32 = COPY killed $vgpr0 | ||
| | ||
| %26:vgpr_32 = V_MOV_B32_e32 49664, implicit $exec | ||
| | ||
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.
I don't want to do that because changing the third operand in this case to be undef changes the behaviour of twoaddrs - it now tries to convert this MAC to a MAD, and the same for a bunch of other cases.
I could use a real instruction instead of IMPLICIT_DEF if that's preferable?