Skip to content
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

[NFC][NVPTX] Cleanup getPreferredVectorAction() #114115

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

justinfargnoli
Copy link
Contributor

@justinfargnoli justinfargnoli commented Oct 29, 2024

v2*16 is a legal type in NVPTX. Thus, this is dead code.

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 29, 2024

@llvm/pr-subscribers-backend-nvptx

Author: Justin Fargnoli (justinfargnoli)

Changes

v2*16 is a legal type in NVPTX. Thus, rely on the default implementation of getPreferredVectorAction().


Full diff: https://github.com/llvm/llvm-project/pull/114115.diff

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp (-2)
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
index 57bc5fe0ac361c..377cf8a722b84e 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
@@ -1337,8 +1337,6 @@ NVPTXTargetLowering::getPreferredVectorAction(MVT VT) const {
   if (!VT.isScalableVector() && VT.getVectorNumElements() != 1 &&
       VT.getScalarType() == MVT::i1)
     return TypeSplitVector;
-  if (Isv2x16VT(VT))
-    return TypeLegal;
   return TargetLoweringBase::getPreferredVectorAction(VT);
 }
 

@AlexMaclean
Copy link
Member

What are the existing tests that verify the behavior is unchanged here?

@justinfargnoli
Copy link
Contributor Author

What are the existing tests that verify the behavior is unchanged here?

Any test that uses v2*16 types.

  • bf16-instructions.ll
  • bf16x2-instructions.ll
  • bf16x2-instructions-approx.ll
  • convert-sm80.ll
  • bswap.ll
  • ...

@justinfargnoli justinfargnoli merged commit e89f821 into llvm:main Oct 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants