[llvm] [IR][REVEC] Define llvm.vector.repeat intrinsic (PR #208212)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 01:49:50 PDT 2026


================
@@ -1990,6 +1990,17 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
       setOperationAction(ISD::VECTOR_SPLICE_RIGHT, VT, Custom);
     }
 
+    // Direct patterns exist for quad broadcasts.
+    for (auto VT : {MVT::nxv16i8, MVT::nxv8i16, MVT::nxv4i32, MVT::nxv2i64,
+                    MVT::nxv8f16, MVT::nxv4f32, MVT::nxv2f64, MVT::nxv8bf16})
+      setOperationAction(ISD::VECTOR_REPEAT, VT, Legal);
+
+    // VECTOR_REPEAT to unpacked SVE types require explicit unpacking to add
+    // spacing between elements.
+    for (auto VT : {MVT::nxv2f16, MVT::nxv4f16, MVT::nxv2f32, MVT::nxv2bf16,
+                    MVT::nxv4bf16})
----------------
gbossu wrote:

Sorry about that, I should have done a more thorough pass over the whole PR to spot these remnants from the original `vector_broadcast` work...

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


More information about the llvm-commits mailing list