[llvm] [IR][REVEC] Define llvm.vector.broadcast intrinsic (PR #208212)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 09:57:16 PDT 2026
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>,
=?utf-8?q?Gaëtan?= Bossu <gaetan.bossu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/208212 at github.com>
================
@@ -17583,6 +17603,52 @@ SDValue AArch64TargetLowering::LowerEXTRACT_SUBVECTOR(SDValue Op,
return SDValue();
}
+SDValue AArch64TargetLowering::LowerVECTOR_BROADCAST(SDValue Op,
+ SelectionDAG &DAG) const {
+ SDLoc DL(Op);
+ EVT VT = Op.getValueType();
+ assert(VT.isScalableVector() &&
+ "Custom lowering expected for scalable vectors only.");
+
+ if (isPackedVectorType(VT, DAG)) {
+ SDValue Src = Op.getOperand(0);
+ EVT SrcVT = Src.getValueType();
+ if (ElementCount::isKnownGE(VT.getVectorElementCount(),
+ SrcVT.getVectorElementCount()))
+ return Op;
----------------
MacDue wrote:
nit: Add a comment that this is legal (and uses the ISEL patterns).
https://github.com/llvm/llvm-project/pull/208212
More information about the llvm-commits
mailing list