[clang] [llvm] [AArch64][SVE] Improve fixed-length addressing modes. (PR #129732)
Ricardo Jesus via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 5 06:53:40 PST 2025
================
@@ -405,6 +405,17 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo {
return MinSVEVectorSizeInBits;
}
+ // Return the known bit length of SVE data registers. A value of 0 means the
+ // length is unkown beyond what's implied by the architecture.
+ unsigned getSVEVectorSizeInBits() const {
+ assert(isSVEorStreamingSVEAvailable() &&
+ "Tried to get SVE vector length without SVE support!");
+ if (MaxSVEVectorSizeInBits &&
+ MinSVEVectorSizeInBits == MaxSVEVectorSizeInBits)
----------------
rj-jesus wrote:
I've left it as is for now due to the lack of a motivating example and to keep it consistent with `getMinSVEVectorSizeInBits`/`getMinSVEVectorSizeInBits`, which I suppose could return 128/2048 as the architecture bounds and avoid this problem altogether. Please let me know if you'd rather I add it.
I'll let the tests run and assuming they are OK merge it.
https://github.com/llvm/llvm-project/pull/129732
More information about the cfe-commits
mailing list