[llvm] [AArch64] Disconnect FeatureUseScalarIncVL from FeatureSVE2. (PR #114568)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 05:58:06 PST 2024
================
@@ -797,6 +794,9 @@ def FeatureUseFixedOverScalableIfEqualCost: SubtargetFeature<"use-fixed-over-sca
"UseFixedOverScalableIfEqualCost", "true",
"Prefer fixed width loop vectorization over scalable if the cost-model assigns equal costs">;
+def FeatureDontUseScalarIncVL : SubtargetFeature<"dont-use-scalar-inc-vl",
----------------
sdesmalen-arm wrote:
I found the double negative in `-mattr=-dont-use-scalar-inc-vl` confusing and the current logic is a bit simpler (although I'm not particularly happy with the explicit partial string matching, which I guess is the downside of doing it this way). A name change would avoid the double negative, but thinking about this; why don't we just make it an LLVM option rather than a feature?
That way, we can do something like:
```
if (ForceScalarIncVL.getNumOccurrences())
UseScalarIncVL = ForceScalarIncVL.getValue();
else if (hasSVE2() || hasSME())
UseScalarIncVL = true;
// else UseScalarIncVL = false; (would be default)
```
We can still make use of the `UseScalarIncVL` Predicate in TableGen, it just wouldn't be defined through a target feature.
https://github.com/llvm/llvm-project/pull/114568
More information about the llvm-commits
mailing list