[llvm] [AArch64] Consider streaming mode in TTI interfaces for vectorization. (PR #96305)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 10:55:28 PDT 2024
================
@@ -2162,19 +2162,20 @@ AArch64TTIImpl::getRegisterBitWidth(TargetTransformInfo::RegisterKind K) const {
case TargetTransformInfo::RGK_Scalar:
return TypeSize::getFixed(64);
case TargetTransformInfo::RGK_FixedWidthVector:
- if (!ST->isNeonAvailable() && !EnableFixedwidthAutovecInStreamingMode)
- return TypeSize::getFixed(0);
-
- if (ST->hasSVE())
+ if (ST->useSVEForFixedLengthVectors() &&
+ (ST->isSVEAvailable() || EnableFixedwidthAutovecInStreamingMode))
return TypeSize::getFixed(
std::max(ST->getMinSVEVectorSizeInBits(), 128u));
----------------
paulwalker-arm wrote:
Alternatively you could implement `-mssve-vector-bits` to allow both quantities to be set independently and then only allow it to be use for streaming compatible functions when the both are specified and equal. Perhaps I've talked myself into this needing a separate PR :)
https://github.com/llvm/llvm-project/pull/96305
More information about the llvm-commits
mailing list