[llvm] [AArch64] Avoid single-element vector fp converts in streaming[-compatible] functions (PR #112213)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 08:46:26 PDT 2024


================
@@ -0,0 +1,121 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -force-streaming-compatible  < %s | FileCheck %s
+; RUN: llc < %s | FileCheck %s --check-prefix=NON-STREAMING
+
+target triple = "aarch64-unknown-linux-gnu"
+
+define double @t1(double %x) {
+; CHECK-LABEL: t1:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    fcvtzs x8, d0
+; CHECK-NEXT:    scvtf d0, x8
----------------
sdesmalen-arm wrote:

This operation may be expensive when executed in streaming mode, because the operations move results between register files (FPR <-> GPR). Could you emulate this operation with SVE instructions instead?
I'm happy for this to be done in a separate patch so that this bugfix can already land.

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


More information about the llvm-commits mailing list