[llvm] [AArch64ISel] Lower dup(bitcast) to duplane(insert_elt(bitcast)) (PR #217931)
Vimal Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 06:12:25 PDT 2026
================
@@ -297,3 +297,30 @@ entry:
%vcmpd.i = zext i1 %0 to i32
ret i32 %vcmpd.i
}
+
+define <4 x i32> @dup_v4i32_bitcast_fp_to_int(float %a) {
+; CHECK-LABEL: dup_v4i32_bitcast_fp_to_int:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
+; CHECK-NEXT: dup v0.4s, v0.s[0]
+; CHECK-NEXT: ret
+entry:
+ %0 = bitcast float %a to i32
+ %vecinit.i = insertelement <4 x i32> poison, i32 %0, i64 0
+ %vecinit3.i = shufflevector <4 x i32> %vecinit.i, <4 x i32> poison, <4 x i32> zeroinitializer
+ ret <4 x i32> %vecinit3.i
+}
+
+define <4 x float> @dup_v4f32_bitcast_int_to_fp(i32 %x) {
+; CHECK-LABEL: dup_v4f32_bitcast_int_to_fp:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: fmov s0, w0
----------------
pvimal816a wrote:
Yeah, it's a bit different. So, I thought not to club it here.
https://github.com/llvm/llvm-project/pull/217931
More information about the llvm-commits
mailing list