================ @@ -132,8 +132,11 @@ LoopVectorizeHints::LoopVectorizeHints(const Loop *L, // If the flag is set to force any use of scalable vectors, override the loop // hints. - if (ForceScalableVectorization.getValue() != - LoopVectorizeHints::SK_Unspecified) + // However: A preference must not turn a UserVF of 1, used by e.g. + // vectorize(disable) pragmas, into a vscale x 1 VF. + if (ForceScalableVectorization.getValue() != SK_Unspecified && + (Width.Value != 1 || ---------------- gbossu wrote:
I've updated the PR to better document how `scalable` is really chosen based on all the hints/options LV gets. Your point makes sense to me and that why I initially restricted (first commit) the change to `-scalable-vectorization=preferred` and `UserVF=1`. I thought that having the pragma take precedence over `-scalable-vectorization` would the the right choice because it's consistent with the other choices made for Width and IC. Now that I've looked at those choices in more detail, I'm not so sure what the "consistent rule" is. š https://github.com/llvm/llvm-project/pull/226948 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
