[llvm] 7d7729b - [RISCV] Remove unneeded code from TTI::isLegalMaskedLoadStore/isLegalMaskedGatherScatter.
    Craig Topper via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jan 31 13:08:41 PST 2023
    
    
  
Author: Craig Topper
Date: 2023-01-31T13:08:22-08:00
New Revision: 7d7729bd2967916c81332537cbccadbee976793f
URL: https://github.com/llvm/llvm-project/commit/7d7729bd2967916c81332537cbccadbee976793f
DIFF: https://github.com/llvm/llvm-project/commit/7d7729bd2967916c81332537cbccadbee976793f.diff
LOG: [RISCV] Remove unneeded code from TTI::isLegalMaskedLoadStore/isLegalMaskedGatherScatter.
We don't need to explicitly check ELEN. It's already handled by
isLegalElementTypeForRVV.
This is a leftover from before we had Zve32/64 extensions and used
a command line option for fixed vectors.
Added: 
    
Modified: 
    llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
index 2bde679c184bc..c0da4bda94949 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
@@ -180,12 +180,6 @@ class RISCVTTIImpl : public BasicTTIImplBase<RISCVTTIImpl> {
     if (isa<FixedVectorType>(DataType) && !ST->useRVVForFixedLengthVectors())
       return false;
 
-    // Don't allow elements larger than the ELEN.
-    // FIXME: How to limit for scalable vectors?
-    if (isa<FixedVectorType>(DataType) &&
-        DataType->getScalarSizeInBits() > ST->getELEN())
-      return false;
-
     if (Alignment <
         DL.getTypeStoreSize(DataType->getScalarType()).getFixedValue())
       return false;
@@ -208,12 +202,6 @@ class RISCVTTIImpl : public BasicTTIImplBase<RISCVTTIImpl> {
     if (isa<FixedVectorType>(DataType) && !ST->useRVVForFixedLengthVectors())
       return false;
 
-    // Don't allow elements larger than the ELEN.
-    // FIXME: How to limit for scalable vectors?
-    if (isa<FixedVectorType>(DataType) &&
-        DataType->getScalarSizeInBits() > ST->getELEN())
-      return false;
-
     if (Alignment <
         DL.getTypeStoreSize(DataType->getScalarType()).getFixedValue())
       return false;
        
    
    
More information about the llvm-commits
mailing list