[llvm] [AArch64] Don't try to vectorize fixed point to fp narrowing conversion (PR #130665)

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 20 10:57:51 PDT 2025


================
@@ -23,26 +23,54 @@ define <16 x half> @sitofp_i32(<16 x i32> %a) #0 {
 define <16 x half> @sitofp_i64(<16 x i64> %a) #0 {
 ; CHECK-LABEL: sitofp_i64:
 ; CHECK:       // %bb.0:
-; CHECK-NEXT:    scvtf v0.2d, v0.2d
-; CHECK-NEXT:    scvtf v4.2d, v4.2d
-; CHECK-NEXT:    scvtf v2.2d, v2.2d
-; CHECK-NEXT:    scvtf v1.2d, v1.2d
-; CHECK-NEXT:    scvtf v6.2d, v6.2d
-; CHECK-NEXT:    scvtf v5.2d, v5.2d
-; CHECK-NEXT:    scvtf v3.2d, v3.2d
-; CHECK-NEXT:    fcvtn v0.2s, v0.2d
-; CHECK-NEXT:    fcvtn v4.2s, v4.2d
-; CHECK-NEXT:    fcvtn v2.2s, v2.2d
-; CHECK-NEXT:    fcvtn v6.2s, v6.2d
-; CHECK-NEXT:    fcvtn2 v0.4s, v1.2d
-; CHECK-NEXT:    scvtf v1.2d, v7.2d
-; CHECK-NEXT:    fcvtn2 v4.4s, v5.2d
-; CHECK-NEXT:    fcvtn2 v2.4s, v3.2d
+; CHECK-NEXT:    fmov x12, d0
----------------
pranavk wrote:

I tried looking. If we want to do that, the check likely needs to be moved earlier before LowerVectorINT_TO_FP (and I am not sure there's any appropriate position for that earlier) as there doesn't seem to be any way to distinguish between instructions that are generated by the compiler (during split, promote, etc.) vs original sint_to_fp instruction once we reach LowerVectorINT_TO_FP.

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


More information about the llvm-commits mailing list