[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)
Paul Walker via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 29 07:12:26 PDT 2025
================
@@ -1168,6 +1168,15 @@ bool Function::nullPointerIsDefined() const {
return hasFnAttribute(Attribute::NullPointerIsValid);
}
+unsigned Function::getVScaleValue() const {
+ Attribute Attr = getFnAttribute(Attribute::VScaleRange);
+ if (!Attr.isValid())
+ return 0;
+
+ unsigned VScale = Attr.getVScaleRangeMax().value_or(0);
+ return VScale == Attr.getVScaleRangeMin() ? VScale : 0;
----------------
paulwalker-arm wrote:
Sounds reasonable. Done.
https://github.com/llvm/llvm-project/pull/130973
More information about the cfe-commits
mailing list