-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[AMDGPU] New RegBanKSelect: Add S128 types #142601
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
Conversation
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 was referenced Jun 3, 2025
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jun 3, 2025
Member
|
@llvm/pr-subscribers-backend-amdgpu Author: Pierre van Houtryve (Pierre-vh) ChangesFull diff: https://github.com/llvm/llvm-project/pull/142601.diff 3 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
index 6b0fb9f925b82..12af7233ffad6 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
@@ -556,6 +556,9 @@ LLT RegBankLegalizeHelper::getTyFromID(RegBankLLTMappingApplyID ID) {
case Sgpr64:
case Vgpr64:
return LLT::scalar(64);
+ case Sgpr128:
+ case Vgpr128:
+ return LLT::scalar(128);
case VgprP0:
case SgprP0:
return LLT::pointer(0, 64);
@@ -656,6 +659,7 @@ RegBankLegalizeHelper::getRegBankFromID(RegBankLLTMappingApplyID ID) {
case Sgpr16:
case Sgpr32:
case Sgpr64:
+ case Sgpr128:
case SgprP0:
case SgprP1:
case SgprP2:
@@ -692,6 +696,7 @@ RegBankLegalizeHelper::getRegBankFromID(RegBankLLTMappingApplyID ID) {
case Vgpr16:
case Vgpr32:
case Vgpr64:
+ case Vgpr128:
case VgprP0:
case VgprP1:
case VgprP2:
@@ -735,6 +740,7 @@ void RegBankLegalizeHelper::applyMappingDst(
case Sgpr16:
case Sgpr32:
case Sgpr64:
+ case Sgpr128:
case SgprP0:
case SgprP1:
case SgprP2:
@@ -749,6 +755,7 @@ void RegBankLegalizeHelper::applyMappingDst(
case Vgpr16:
case Vgpr32:
case Vgpr64:
+ case Vgpr128:
case VgprP0:
case VgprP1:
case VgprP2:
@@ -863,6 +870,7 @@ void RegBankLegalizeHelper::applyMappingSrc(
case Sgpr16:
case Sgpr32:
case Sgpr64:
+ case Sgpr128:
case SgprP0:
case SgprP1:
case SgprP2:
@@ -893,6 +901,7 @@ void RegBankLegalizeHelper::applyMappingSrc(
case Vgpr16:
case Vgpr32:
case Vgpr64:
+ case Vgpr128:
case VgprP0:
case VgprP1:
case VgprP2:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
index d7ff1a9080b72..08a35b9794344 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
@@ -50,6 +50,8 @@ bool matchUniformityAndLLT(Register Reg, UniformityLLTOpPredicateID UniID,
return MRI.getType(Reg) == LLT::scalar(32);
case S64:
return MRI.getType(Reg) == LLT::scalar(64);
+ case S128:
+ return MRI.getType(Reg) == LLT::scalar(128);
case P0:
return MRI.getType(Reg) == LLT::pointer(0, 64);
case P1:
@@ -90,6 +92,8 @@ bool matchUniformityAndLLT(Register Reg, UniformityLLTOpPredicateID UniID,
return MRI.getType(Reg) == LLT::scalar(32) && MUI.isUniform(Reg);
case UniS64:
return MRI.getType(Reg) == LLT::scalar(64) && MUI.isUniform(Reg);
+ case UniS128:
+ return MRI.getType(Reg) == LLT::scalar(128) && MUI.isUniform(Reg);
case UniP0:
return MRI.getType(Reg) == LLT::pointer(0, 64) && MUI.isUniform(Reg);
case UniP1:
@@ -128,6 +132,8 @@ bool matchUniformityAndLLT(Register Reg, UniformityLLTOpPredicateID UniID,
return MRI.getType(Reg) == LLT::scalar(32) && MUI.isDivergent(Reg);
case DivS64:
return MRI.getType(Reg) == LLT::scalar(64) && MUI.isDivergent(Reg);
+ case DivS128:
+ return MRI.getType(Reg) == LLT::scalar(128) && MUI.isDivergent(Reg);
case DivP0:
return MRI.getType(Reg) == LLT::pointer(0, 64) && MUI.isDivergent(Reg);
case DivP1:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
index a7a5b0ebba187..14be873b6ce19 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.h
@@ -39,16 +39,19 @@ enum UniformityLLTOpPredicateID {
S16,
S32,
S64,
+ S128,
UniS1,
UniS16,
UniS32,
UniS64,
+ UniS128,
DivS1,
DivS16,
DivS32,
DivS64,
+ DivS128,
// pointers
P0,
@@ -126,6 +129,7 @@ enum RegBankLLTMappingApplyID {
Sgpr16,
Sgpr32,
Sgpr64,
+ Sgpr128,
SgprP0,
SgprP1,
SgprP2,
@@ -148,6 +152,7 @@ enum RegBankLLTMappingApplyID {
Vgpr16,
Vgpr32,
Vgpr64,
+ Vgpr128,
VgprP0,
VgprP1,
VgprP2,
|
5805695 to
96669ee
Compare
f480387 to
181364c
Compare
Contributor
Author
|
ping |
arsenm
approved these changes
Jun 19, 2025
Contributor
Author
Merge activity
|
f1ae2fc to
ac8e7d3
Compare
96669ee to
e914856
Compare
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.

No description provided.