Skip to content

Commit 7bf8888

Browse files
committed
[VectorCombine] Scalarize nary ops and intrinsics
1 parent 4d8ba5c commit 7bf8888

File tree

3 files changed

+114
-108
lines changed

3 files changed

+114
-108
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 98 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ STATISTIC(NumVecCmp, "Number of vector compares formed");
4747
STATISTIC(NumVecBO, "Number of vector binops formed");
4848
STATISTIC(NumVecCmpBO, "Number of vector compare + binop formed");
4949
STATISTIC(NumShufOfBitcast, "Number of shuffles moved after bitcast");
50-
STATISTIC(NumScalarBO, "Number of scalar binops formed");
50+
STATISTIC(NumScalarOps, "Number of scalar unary + binary ops formed");
5151
STATISTIC(NumScalarCmp, "Number of scalar compares formed");
5252
STATISTIC(NumScalarIntrinsic, "Number of scalar intrinsic calls formed");
5353

@@ -114,7 +114,7 @@ class VectorCombine {
114114
bool foldInsExtBinop(Instruction &I);
115115
bool foldInsExtVectorToShuffle(Instruction &I);
116116
bool foldBitcastShuffle(Instruction &I);
117-
bool scalarizeBinopOrCmp(Instruction &I);
117+
bool scalarizeOpOrCmp(Instruction &I);
118118
bool scalarizeVPIntrinsic(Instruction &I);
119119
bool foldExtractedCmps(Instruction &I);
120120
bool foldBinopOfReductions(Instruction &I);
@@ -1018,28 +1018,20 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
10181018
return true;
10191019
}
10201020

1021-
/// Match a vector binop, compare or binop-like intrinsic with at least one
1022-
/// inserted scalar operand and convert to scalar binop/cmp/intrinsic followed
1021+
/// Match a vector op/compare/intrinsic with at least one
1022+
/// inserted scalar operand and convert to scalar op/cmp/intrinsic followed
10231023
/// by insertelement.
1024-
bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
1025-
CmpPredicate Pred = CmpInst::BAD_ICMP_PREDICATE;
1026-
Value *Ins0, *Ins1;
1027-
if (!match(&I, m_BinOp(m_Value(Ins0), m_Value(Ins1))) &&
1028-
!match(&I, m_Cmp(Pred, m_Value(Ins0), m_Value(Ins1)))) {
1029-
// TODO: Allow unary and ternary intrinsics
1030-
// TODO: Allow intrinsics with different argument types
1031-
// TODO: Allow intrinsics with scalar arguments
1032-
if (auto *II = dyn_cast<IntrinsicInst>(&I);
1033-
II && II->arg_size() == 2 &&
1034-
isTriviallyVectorizable(II->getIntrinsicID()) &&
1035-
all_of(II->args(),
1036-
[&II](Value *Arg) { return Arg->getType() == II->getType(); })) {
1037-
Ins0 = II->getArgOperand(0);
1038-
Ins1 = II->getArgOperand(1);
1039-
} else {
1024+
bool VectorCombine::scalarizeOpOrCmp(Instruction &I) {
1025+
if (!isa<UnaryOperator, BinaryOperator, CmpInst, IntrinsicInst>(I))
1026+
return false;
1027+
1028+
// TODO: Allow intrinsics with different argument types
1029+
// TODO: Allow intrinsics with scalar arguments
1030+
if (auto *II = dyn_cast<IntrinsicInst>(&I))
1031+
if (!isTriviallyVectorizable(II->getIntrinsicID()) ||
1032+
!all_of(II->args(),
1033+
[&II](Value *Arg) { return Arg->getType() == II->getType(); }))
10401034
return false;
1041-
}
1042-
}
10431035

10441036
// Do not convert the vector condition of a vector select into a scalar
10451037
// condition. That may cause problems for codegen because of differences in
@@ -1050,42 +1042,47 @@ bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
10501042
if (match(U, m_Select(m_Specific(&I), m_Value(), m_Value())))
10511043
return false;
10521044

1053-
// Match against one or both scalar values being inserted into constant
1054-
// vectors:
1055-
// vec_op VecC0, (inselt VecC1, V1, Index)
1056-
// vec_op (inselt VecC0, V0, Index), VecC1
1057-
// vec_op (inselt VecC0, V0, Index), (inselt VecC1, V1, Index)
1058-
// TODO: Deal with mismatched index constants and variable indexes?
1059-
Constant *VecC0 = nullptr, *VecC1 = nullptr;
1060-
Value *V0 = nullptr, *V1 = nullptr;
1061-
uint64_t Index0 = 0, Index1 = 0;
1062-
if (!match(Ins0, m_InsertElt(m_Constant(VecC0), m_Value(V0),
1063-
m_ConstantInt(Index0))) &&
1064-
!match(Ins0, m_Constant(VecC0)))
1065-
return false;
1066-
if (!match(Ins1, m_InsertElt(m_Constant(VecC1), m_Value(V1),
1067-
m_ConstantInt(Index1))) &&
1068-
!match(Ins1, m_Constant(VecC1)))
1069-
return false;
1070-
1071-
bool IsConst0 = !V0;
1072-
bool IsConst1 = !V1;
1073-
if (IsConst0 && IsConst1)
1074-
return false;
1075-
if (!IsConst0 && !IsConst1 && Index0 != Index1)
1076-
return false;
1045+
// Match constant vectors or scalars being inserted into constant vectors:
1046+
// vec_op [VecC0 | (inselt VecC0, V0, Index)], ...
1047+
SmallVector<Constant *> VecCs;
1048+
SmallVector<Value *> ScalarOps;
1049+
std::optional<uint64_t> Index;
1050+
1051+
auto Ops = isa<IntrinsicInst>(I) ? cast<IntrinsicInst>(I).args()
1052+
: I.operand_values();
1053+
for (Value *Op : Ops) {
1054+
Constant *VecC;
1055+
Value *V;
1056+
uint64_t InsIdx = 0;
1057+
VectorType *OpTy = cast<VectorType>(Op->getType());
1058+
if (match(Op, m_InsertElt(m_Constant(VecC), m_Value(V),
1059+
m_ConstantInt(InsIdx)))) {
1060+
// Bail if any inserts are out of bounds.
1061+
if (OpTy->getElementCount().getKnownMinValue() <= InsIdx)
1062+
return false;
1063+
// All inserts must have the same index.
1064+
// TODO: Deal with mismatched index constants and variable indexes?
1065+
if (!Index)
1066+
Index = InsIdx;
1067+
else if (InsIdx != *Index)
1068+
return false;
1069+
VecCs.push_back(VecC);
1070+
ScalarOps.push_back(V);
1071+
} else if (match(Op, m_Constant(VecC))) {
1072+
VecCs.push_back(VecC);
1073+
ScalarOps.push_back(nullptr);
1074+
} else {
1075+
return false;
1076+
}
1077+
}
10771078

1078-
auto *VecTy0 = cast<VectorType>(Ins0->getType());
1079-
auto *VecTy1 = cast<VectorType>(Ins1->getType());
1080-
if (VecTy0->getElementCount().getKnownMinValue() <= Index0 ||
1081-
VecTy1->getElementCount().getKnownMinValue() <= Index1)
1079+
// Bail if all operands are constant.
1080+
if (!Index.has_value())
10821081
return false;
10831082

1084-
uint64_t Index = IsConst0 ? Index1 : Index0;
1085-
Type *ScalarTy = IsConst0 ? V1->getType() : V0->getType();
1086-
Type *VecTy = I.getType();
1083+
VectorType *VecTy = cast<VectorType>(I.getType());
1084+
Type *ScalarTy = VecTy->getScalarType();
10871085
assert(VecTy->isVectorTy() &&
1088-
(IsConst0 || IsConst1 || V0->getType() == V1->getType()) &&
10891086
(ScalarTy->isIntegerTy() || ScalarTy->isFloatingPointTy() ||
10901087
ScalarTy->isPointerTy()) &&
10911088
"Unexpected types for insert element into binop or cmp");
@@ -1098,7 +1095,7 @@ bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
10981095
Opcode, ScalarTy, CmpInst::makeCmpResultType(ScalarTy), Pred, CostKind);
10991096
VectorOpCost = TTI.getCmpSelInstrCost(
11001097
Opcode, VecTy, CmpInst::makeCmpResultType(VecTy), Pred, CostKind);
1101-
} else if (isa<BinaryOperator>(I)) {
1098+
} else if (isa<UnaryOperator, BinaryOperator>(I)) {
11021099
ScalarOpCost = TTI.getArithmeticInstrCost(Opcode, ScalarTy, CostKind);
11031100
VectorOpCost = TTI.getArithmeticInstrCost(Opcode, VecTy, CostKind);
11041101
} else {
@@ -1115,29 +1112,36 @@ bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
11151112

11161113
// Fold the vector constants in the original vectors into a new base vector to
11171114
// get more accurate cost modelling.
1118-
Value *NewVecC;
1119-
if (isa<CmpInst>(I))
1120-
NewVecC = ConstantFoldCompareInstOperands(Pred, VecC0, VecC1, *DL);
1115+
Value *NewVecC = nullptr;
1116+
if (auto *CI = dyn_cast<CmpInst>(&I))
1117+
NewVecC = ConstantFoldCompareInstOperands(CI->getPredicate(), VecCs[0],
1118+
VecCs[1], *DL);
1119+
else if (isa<UnaryOperator>(I))
1120+
NewVecC = ConstantFoldUnaryOpOperand((Instruction::UnaryOps)Opcode,
1121+
VecCs[0], *DL);
11211122
else if (isa<BinaryOperator>(I))
11221123
NewVecC = ConstantFoldBinaryOpOperands((Instruction::BinaryOps)Opcode,
1123-
VecC0, VecC1, *DL);
1124-
else
1125-
NewVecC = ConstantFoldBinaryIntrinsic(
1126-
cast<IntrinsicInst>(I).getIntrinsicID(), VecC0, VecC1, I.getType(), &I);
1124+
VecCs[0], VecCs[1], *DL);
1125+
else if (isa<IntrinsicInst>(I) && cast<IntrinsicInst>(I).arg_size() == 2)
1126+
NewVecC =
1127+
ConstantFoldBinaryIntrinsic(cast<IntrinsicInst>(I).getIntrinsicID(),
1128+
VecCs[0], VecCs[1], I.getType(), &I);
11271129

11281130
// Get cost estimate for the insert element. This cost will factor into
11291131
// both sequences.
1130-
InstructionCost InsertCostNewVecC = TTI.getVectorInstrCost(
1131-
Instruction::InsertElement, VecTy, CostKind, Index, NewVecC);
1132-
InstructionCost InsertCostV0 = TTI.getVectorInstrCost(
1133-
Instruction::InsertElement, VecTy, CostKind, Index, VecC0, V0);
1134-
InstructionCost InsertCostV1 = TTI.getVectorInstrCost(
1135-
Instruction::InsertElement, VecTy, CostKind, Index, VecC1, V1);
1136-
InstructionCost OldCost = (IsConst0 ? 0 : InsertCostV0) +
1137-
(IsConst1 ? 0 : InsertCostV1) + VectorOpCost;
1138-
InstructionCost NewCost = ScalarOpCost + InsertCostNewVecC +
1139-
(IsConst0 ? 0 : !Ins0->hasOneUse() * InsertCostV0) +
1140-
(IsConst1 ? 0 : !Ins1->hasOneUse() * InsertCostV1);
1132+
InstructionCost OldCost = VectorOpCost;
1133+
InstructionCost NewCost =
1134+
ScalarOpCost + TTI.getVectorInstrCost(Instruction::InsertElement, VecTy,
1135+
CostKind, *Index, NewVecC);
1136+
for (auto [Op, VecC, Scalar] : zip(Ops, VecCs, ScalarOps)) {
1137+
if (!Scalar)
1138+
continue;
1139+
InstructionCost InsertCost = TTI.getVectorInstrCost(
1140+
Instruction::InsertElement, VecTy, CostKind, *Index, VecC, Scalar);
1141+
OldCost += InsertCost;
1142+
NewCost += !Op->hasOneUse() * InsertCost;
1143+
}
1144+
11411145
// We want to scalarize unless the vector variant actually has lower cost.
11421146
if (OldCost < NewCost || !NewCost.isValid())
11431147
return false;
@@ -1146,25 +1150,25 @@ bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
11461150
// inselt NewVecC, (scalar_op V0, V1), Index
11471151
if (isa<CmpInst>(I))
11481152
++NumScalarCmp;
1149-
else if (isa<BinaryOperator>(I))
1150-
++NumScalarBO;
1153+
else if (isa<UnaryOperator, BinaryOperator>(I))
1154+
++NumScalarOps;
11511155
else if (isa<IntrinsicInst>(I))
11521156
++NumScalarIntrinsic;
11531157

11541158
// For constant cases, extract the scalar element, this should constant fold.
1155-
if (IsConst0)
1156-
V0 = ConstantExpr::getExtractElement(VecC0, Builder.getInt64(Index));
1157-
if (IsConst1)
1158-
V1 = ConstantExpr::getExtractElement(VecC1, Builder.getInt64(Index));
1159+
for (auto [OpIdx, Scalar, VecC] : enumerate(ScalarOps, VecCs))
1160+
if (!Scalar)
1161+
ScalarOps[OpIdx] = ConstantExpr::getExtractElement(
1162+
cast<Constant>(VecC), Builder.getInt64(*Index));
11591163

11601164
Value *Scalar;
1161-
if (isa<CmpInst>(I))
1162-
Scalar = Builder.CreateCmp(Pred, V0, V1);
1163-
else if (isa<BinaryOperator>(I))
1164-
Scalar = Builder.CreateBinOp((Instruction::BinaryOps)Opcode, V0, V1);
1165+
if (auto *CI = dyn_cast<CmpInst>(&I))
1166+
Scalar = Builder.CreateCmp(CI->getPredicate(), ScalarOps[0], ScalarOps[1]);
1167+
else if (isa<UnaryOperator, BinaryOperator>(I))
1168+
Scalar = Builder.CreateNAryOp(Opcode, ScalarOps);
11651169
else
11661170
Scalar = Builder.CreateIntrinsic(
1167-
ScalarTy, cast<IntrinsicInst>(I).getIntrinsicID(), {V0, V1});
1171+
ScalarTy, cast<IntrinsicInst>(I).getIntrinsicID(), ScalarOps);
11681172

11691173
Scalar->setName(I.getName() + ".scalar");
11701174

@@ -1175,16 +1179,18 @@ bool VectorCombine::scalarizeBinopOrCmp(Instruction &I) {
11751179

11761180
// Create a new base vector if the constant folding failed.
11771181
if (!NewVecC) {
1178-
if (isa<CmpInst>(I))
1179-
NewVecC = Builder.CreateCmp(Pred, VecC0, VecC1);
1180-
else if (isa<BinaryOperator>(I))
1181-
NewVecC =
1182-
Builder.CreateBinOp((Instruction::BinaryOps)Opcode, VecC0, VecC1);
1182+
SmallVector<Value *> VecCValues;
1183+
VecCValues.reserve(VecCs.size());
1184+
append_range(VecCValues, VecCs);
1185+
if (auto *CI = dyn_cast<CmpInst>(&I))
1186+
NewVecC = Builder.CreateCmp(CI->getPredicate(), VecCs[0], VecCs[1]);
1187+
else if (isa<UnaryOperator, BinaryOperator>(I))
1188+
NewVecC = Builder.CreateNAryOp(Opcode, VecCValues);
11831189
else
11841190
NewVecC = Builder.CreateIntrinsic(
1185-
VecTy, cast<IntrinsicInst>(I).getIntrinsicID(), {VecC0, VecC1});
1191+
VecTy, cast<IntrinsicInst>(I).getIntrinsicID(), VecCValues);
11861192
}
1187-
Value *Insert = Builder.CreateInsertElement(NewVecC, Scalar, Index);
1193+
Value *Insert = Builder.CreateInsertElement(NewVecC, Scalar, *Index);
11881194
replaceValue(I, *Insert);
11891195
return true;
11901196
}
@@ -3570,7 +3576,7 @@ bool VectorCombine::run() {
35703576
// This transform works with scalable and fixed vectors
35713577
// TODO: Identify and allow other scalable transforms
35723578
if (IsVectorType) {
3573-
MadeChange |= scalarizeBinopOrCmp(I);
3579+
MadeChange |= scalarizeOpOrCmp(I);
35743580
MadeChange |= scalarizeLoadExtract(I);
35753581
MadeChange |= scalarizeVPIntrinsic(I);
35763582
MadeChange |= foldInterleaveIntrinsics(I);

llvm/test/Transforms/VectorCombine/intrinsic-scalarize.ll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ define <4 x i32> @non_trivially_vectorizable(i32 %x, i32 %y) {
9999
define <4 x float> @fabs_fixed(float %x) {
100100
; CHECK-LABEL: define <4 x float> @fabs_fixed(
101101
; CHECK-SAME: float [[X:%.*]]) {
102-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <4 x float> poison, float [[X]], i32 0
103-
; CHECK-NEXT: [[V:%.*]] = call <4 x float> @llvm.fabs.v4f32(<4 x float> [[X_INSERT]])
102+
; CHECK-NEXT: [[V_SCALAR:%.*]] = call float @llvm.fabs.f32(float [[X]])
103+
; CHECK-NEXT: [[TMP1:%.*]] = call <4 x float> @llvm.fabs.v4f32(<4 x float> poison)
104+
; CHECK-NEXT: [[V:%.*]] = insertelement <4 x float> [[TMP1]], float [[V_SCALAR]], i64 0
104105
; CHECK-NEXT: ret <4 x float> [[V]]
105106
;
106107
%x.insert = insertelement <4 x float> poison, float %x, i32 0
@@ -111,8 +112,9 @@ define <4 x float> @fabs_fixed(float %x) {
111112
define <vscale x 4 x float> @fabs_scalable(float %x) {
112113
; CHECK-LABEL: define <vscale x 4 x float> @fabs_scalable(
113114
; CHECK-SAME: float [[X:%.*]]) {
114-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[X]], i32 0
115-
; CHECK-NEXT: [[V:%.*]] = call <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> [[X_INSERT]])
115+
; CHECK-NEXT: [[V_SCALAR:%.*]] = call float @llvm.fabs.f32(float [[X]])
116+
; CHECK-NEXT: [[TMP1:%.*]] = call <vscale x 4 x float> @llvm.fabs.nxv4f32(<vscale x 4 x float> poison)
117+
; CHECK-NEXT: [[V:%.*]] = insertelement <vscale x 4 x float> [[TMP1]], float [[V_SCALAR]], i64 0
116118
; CHECK-NEXT: ret <vscale x 4 x float> [[V]]
117119
;
118120
%x.insert = insertelement <vscale x 4 x float> poison, float %x, i32 0
@@ -123,10 +125,9 @@ define <vscale x 4 x float> @fabs_scalable(float %x) {
123125
define <4 x float> @fma_fixed(float %x, float %y, float %z) {
124126
; CHECK-LABEL: define <4 x float> @fma_fixed(
125127
; CHECK-SAME: float [[X:%.*]], float [[Y:%.*]], float [[Z:%.*]]) {
126-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <4 x float> poison, float [[X]], i32 0
127-
; CHECK-NEXT: [[Y_INSERT:%.*]] = insertelement <4 x float> poison, float [[Y]], i32 0
128-
; CHECK-NEXT: [[Z_INSERT:%.*]] = insertelement <4 x float> poison, float [[Z]], i32 0
129-
; CHECK-NEXT: [[V:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> [[X_INSERT]], <4 x float> [[Y_INSERT]], <4 x float> [[Z_INSERT]])
128+
; CHECK-NEXT: [[V_SCALAR:%.*]] = call float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])
129+
; CHECK-NEXT: [[TMP1:%.*]] = call <4 x float> @llvm.fma.v4f32(<4 x float> poison, <4 x float> poison, <4 x float> poison)
130+
; CHECK-NEXT: [[V:%.*]] = insertelement <4 x float> [[TMP1]], float [[V_SCALAR]], i64 0
130131
; CHECK-NEXT: ret <4 x float> [[V]]
131132
;
132133
%x.insert = insertelement <4 x float> poison, float %x, i32 0
@@ -139,10 +140,9 @@ define <4 x float> @fma_fixed(float %x, float %y, float %z) {
139140
define <vscale x 4 x float> @fma_scalable(float %x, float %y, float %z) {
140141
; CHECK-LABEL: define <vscale x 4 x float> @fma_scalable(
141142
; CHECK-SAME: float [[X:%.*]], float [[Y:%.*]], float [[Z:%.*]]) {
142-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[X]], i32 0
143-
; CHECK-NEXT: [[Y_INSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[Y]], i32 0
144-
; CHECK-NEXT: [[Z_INSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[Z]], i32 0
145-
; CHECK-NEXT: [[V:%.*]] = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> [[X_INSERT]], <vscale x 4 x float> [[Y_INSERT]], <vscale x 4 x float> [[Z_INSERT]])
143+
; CHECK-NEXT: [[V_SCALAR:%.*]] = call float @llvm.fma.f32(float [[X]], float [[Y]], float [[Z]])
144+
; CHECK-NEXT: [[TMP1:%.*]] = call <vscale x 4 x float> @llvm.fma.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, <vscale x 4 x float> poison)
145+
; CHECK-NEXT: [[V:%.*]] = insertelement <vscale x 4 x float> [[TMP1]], float [[V_SCALAR]], i64 0
146146
; CHECK-NEXT: ret <vscale x 4 x float> [[V]]
147147
;
148148
%x.insert = insertelement <vscale x 4 x float> poison, float %x, i32 0

llvm/test/Transforms/VectorCombine/unary-op-scalarize.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
define <4 x float> @fneg_fixed(float %x) {
55
; CHECK-LABEL: define <4 x float> @fneg_fixed(
66
; CHECK-SAME: float [[X:%.*]]) {
7-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <4 x float> poison, float [[X]], i32 0
8-
; CHECK-NEXT: [[V:%.*]] = fneg <4 x float> [[X_INSERT]]
7+
; CHECK-NEXT: [[V_SCALAR:%.*]] = fneg float [[X]]
8+
; CHECK-NEXT: [[V:%.*]] = insertelement <4 x float> poison, float [[V_SCALAR]], i64 0
99
; CHECK-NEXT: ret <4 x float> [[V]]
1010
;
1111
%x.insert = insertelement <4 x float> poison, float %x, i32 0
@@ -16,8 +16,8 @@ define <4 x float> @fneg_fixed(float %x) {
1616
define <vscale x 4 x float> @fneg_scalable(float %x) {
1717
; CHECK-LABEL: define <vscale x 4 x float> @fneg_scalable(
1818
; CHECK-SAME: float [[X:%.*]]) {
19-
; CHECK-NEXT: [[X_INSERT:%.*]] = insertelement <vscale x 4 x float> poison, float [[X]], i32 0
20-
; CHECK-NEXT: [[V:%.*]] = fneg <vscale x 4 x float> [[X_INSERT]]
19+
; CHECK-NEXT: [[V_SCALAR:%.*]] = fneg float [[X]]
20+
; CHECK-NEXT: [[V:%.*]] = insertelement <vscale x 4 x float> poison, float [[V_SCALAR]], i64 0
2121
; CHECK-NEXT: ret <vscale x 4 x float> [[V]]
2222
;
2323
%x.insert = insertelement <vscale x 4 x float> poison, float %x, i32 0

0 commit comments

Comments
 (0)