[llvm] [IR][REVEC] Define llvm.vector.broadcast intrinsic (PR #208212)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 10:54:32 PDT 2026
================
@@ -8058,6 +8085,30 @@ SDValue DAGTypeLegalizer::WidenVecOp_CONCAT_VECTORS(SDNode *N) {
return DAG.getBuildVector(VT, dl, Ops);
}
+SDValue DAGTypeLegalizer::WidenVecOp_VECTOR_REPEAT(SDNode *N) {
+ SDLoc DL(N);
+ EVT VT = N->getValueType(0);
+ SDValue Src = N->getOperand(0);
+ EVT SrcVT = Src.getValueType();
+ EVT WidennedSrcVT = TLI.getTypeToTransformTo(*DAG.getContext(), SrcVT);
+ assert(WidennedSrcVT.getVectorElementCount().isKnownMultipleOf(
+ SrcVT.getVectorElementCount()) &&
+ "Cannot widen VECTOR_REPEAT operand to an ElementCount that's not "
+ "a multiple of the input ElementCount.");
+ unsigned NumConcat =
+ WidennedSrcVT.getVectorMinNumElements() / SrcVT.getVectorMinNumElements();
----------------
gbossu wrote:
Changed and turned the assert into a `report_fatal_error`.
https://github.com/llvm/llvm-project/pull/208212
More information about the llvm-commits
mailing list