[llvm] [AArch64] Wrap integer SCALAR_TO_VECTOR nodes in bitcasts (PR #172837)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 11:58:39 PST 2026


================
@@ -200,10 +200,27 @@ def dup_v4f32 :
              [(v2f32 (extract_subvector (v4f32 (AArch64duplane32 (v4f32 node:$LHS), node:$RHS)), (i64 0))),
               (v2f32 (AArch64duplane32 (v4f32 node:$LHS), node:$RHS))]>;
 
+// Match scalar_to_vector values, optionally wrapped in a bitcast through
+// f32/f64.
+def scalar_to_vector_any_64 : PatFrags<(ops node:$src),
+                          [(scalar_to_vector node:$src),
+                           (bitconvert (v2f32 (scalar_to_vector (f32 (bitconvert node:$src))))),
+                           (bitconvert (v1f64 (scalar_to_vector (f64 (bitconvert node:$src)))))]>;
----------------
Lukacma wrote:

Okay. Correct me if I am wring but looking at the *.inc file, it doesn't seem like adding predicates would help reduce the size of the table, so I split the patFrags instead based on type.

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


More information about the llvm-commits mailing list