[llvm] [AArch64][SVE] Lower scalar FP converts to SVE when Neon is unavailable (PR #112564)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 01:55:15 PDT 2024


================
@@ -4636,6 +4677,12 @@ SDValue AArch64TargetLowering::LowerFP_TO_INT(SDValue Op,
   if (SrcVal.getValueType().isVector())
     return LowerVectorFP_TO_INT(Op, DAG);
 
+  if (!IsStrict && !Subtarget->isNeonAvailable() &&
+      Subtarget->isSVEorStreamingSVEAvailable() &&
----------------
sdesmalen-arm wrote:

nit: we're not really doing this because we don't have NEON instructions, but rather because in streaming(-compatible) mode the transfer between registers is expensive, so I think it's better to phrase the expression around that even though it is functionally equivalent.
```suggestion
  if (!IsStrict && Subtarget->isSVEorStreamingSVEAvailable() &&
      (Subtarget->isStreaming() || Subtarget->isStreamingCompatible()) &&
```

Could you also add a comment describing the 'why' here?

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


More information about the llvm-commits mailing list