[llvm] [AArch64][SVE] Avoid transfer to GPRs for fp -> int -> fp conversions (PR #112564)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 10:03:38 PDT 2024
================
@@ -2421,6 +2421,42 @@ let Predicates = [HasSVEorSME] in {
defm FSQRT_ZPmZ : sve_fp_2op_p_zd_HSD<0b01101, "fsqrt", AArch64fsqrt_mt>;
} // End HasSVEorSME
+// Helper for creating scalar fp -> int -> fp conversions using SVE.
----------------
MacDue wrote:
I'll see about moving these patterns to C++, I'm not sure we'd want to lower `FP_TO_INT` and `INT_TO_FP` separately though (vs a custom dag combine). If the user really did want the value in a GPR, I think we could end up turning. Though maybe we could just check the users while lowering the operation.
```
fcvtzs w8, s0
// do something with w8
```
into:
```
ptrue p0.s, vl1
fcvtzs z0.s, p0/m, z0.s
fmov w8, s0
// do something with w8
```
https://github.com/llvm/llvm-project/pull/112564
More information about the llvm-commits
mailing list