Skip to content

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
Member

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
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
`v2*16` is a legal type in NVPTX. Thus, this is dead code.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
`v2*16` is a legal type in NVPTX. Thus, this is dead code.
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