[llvm] [AArch64] Consider runtime mode when deciding to use SVE for fixed-length vectors. (PR #96081)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 10:31:00 PDT 2024


================
@@ -412,7 +417,8 @@ AArch64TargetMachine::getSubtargetImpl(const Function &F) const {
   StringRef FS = FSAttr.isValid() ? FSAttr.getValueAsString() : TargetFS;
   bool HasMinSize = F.hasMinSize();
 
-  bool IsStreaming = F.hasFnAttribute("aarch64_pstate_sm_enabled") ||
+  bool IsStreaming = ForceStreaming ||
+                     F.hasFnAttribute("aarch64_pstate_sm_enabled") ||
                      F.hasFnAttribute("aarch64_pstate_sm_body");
----------------
paulwalker-arm wrote:

Extremely petty comment but for `IsStreamingCompatible` you check the function attributes first followed by the command line option, but here the order is reversed.  My OCD doesn't like this :)

https://github.com/llvm/llvm-project/pull/96081


More information about the llvm-commits mailing list