[llvm] [LLVM][SVE] Improve code generation for i1 based int_to_fp operations. (PR #129229)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 03:39:50 PST 2025


================
@@ -454,9 +454,8 @@ define <vscale x 2 x i64> @fcvtzu_d_nxv2f64(<vscale x 2 x double> %a) {
 define <vscale x 2 x half> @scvtf_h_nxv2i1(<vscale x 2 x i1> %a) {
 ; CHECK-LABEL: scvtf_h_nxv2i1:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    mov z0.d, p0/z, #-1 // =0xffffffffffffffff
-; CHECK-NEXT:    ptrue p0.d
-; CHECK-NEXT:    scvtf z0.h, p0/m, z0.d
+; CHECK-NEXT:    mov z0.h, #0 // =0x0
+; CHECK-NEXT:    fmov z0.h, p0/m, #-1.00000000
----------------
paulwalker-arm wrote:

We can do better here by removing the explicit zeroing.  I would like have that as a follow up PR because it involves more tablegen and my intent with this PR is to clean up the C++ lowering code to make it easier to add the missing bfloat support.

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


More information about the llvm-commits mailing list