[PATCH] D128538: [RISCV] Implement RISCVTTIImpl::getMaxVScale correctly
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 16:52:09 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4710e789741f: [RISCV] Implement RISCVTTIImpl::getMaxVScale correctly (authored by reames).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128538/new/
https://reviews.llvm.org/D128538
Files:
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -132,16 +132,8 @@
}
Optional<unsigned> RISCVTTIImpl::getMaxVScale() const {
- // There is no assumption of the maximum vector length in V specification.
- // We use the value specified by users as the maximum vector length.
- // This function will use the assumed maximum vector length to get the
- // maximum vscale for LoopVectorizer.
- // If users do not specify the maximum vector length, we have no way to
- // know whether the LoopVectorizer is safe to do or not.
- // We only consider to use single vector register (LMUL = 1) to vectorize.
- unsigned MaxVectorSizeInBits = ST->getMaxRVVVectorSizeInBits();
- if (ST->hasVInstructions() && MaxVectorSizeInBits != 0)
- return MaxVectorSizeInBits / RISCV::RVVBitsPerBlock;
+ if (ST->hasVInstructions())
+ return ST->getRealMaxVLen() / RISCV::RVVBitsPerBlock;
return BaseT::getMaxVScale();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128538.439929.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220624/5b0ad5a9/attachment.bin>
More information about the llvm-commits
mailing list