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 { if (isa(DataType) && !ST->useRVVForFixedLengthVectors()) return false; - // Don't allow elements larger than the ELEN. - // FIXME: How to limit for scalable vectors? - if (isa(DataType) && - DataType->getScalarSizeInBits() > ST->getELEN()) - return false; - if (Alignment < DL.getTypeStoreSize(DataType->getScalarType()).getFixedValue()) return false; @@ -208,12 +202,6 @@ class RISCVTTIImpl : public BasicTTIImplBase { if (isa(DataType) && !ST->useRVVForFixedLengthVectors()) return false; - // Don't allow elements larger than the ELEN. - // FIXME: How to limit for scalable vectors? - if (isa(DataType) && - DataType->getScalarSizeInBits() > ST->getELEN()) - return false; - if (Alignment < DL.getTypeStoreSize(DataType->getScalarType()).getFixedValue()) return false;