return DAG.getBuildVector(N->getValueType(0), SDLoc(N), Ops);
}
-/// If the input is a vector that needs to be scalarized, it must be <1 x ty>,
-/// so just return the element, ignoring the index.
-SDValue DAGTypeLegalizer::ScalarizeVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {
- SDValue Res = GetScalarizedVector(N->getOperand(0));
- if (Res.getValueType() != N->getValueType(0))
- Res = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), N->getValueType(0),
- Res);
- return Res;
-}
-
+/// If the input is a vector that needs to be scalarized, it must be <1 x ty>,\r
+/// so just return the element, ignoring the index.\r
+SDValue DAGTypeLegalizer::ScalarizeVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {\r
+ EVT VT = N->getValueType(0);\r
+ SDValue Res = GetScalarizedVector(N->getOperand(0));\r
+ if (Res.getValueType() != VT)\r
+ Res = DAG.getNode(ISD::ANY_EXTEND, SDLoc(N), VT, Res);\r
+ return Res;\r
+}\r
+\r
/// If the input condition is a vector that needs to be scalarized, it must be
/// <1 x i1>, so just convert to a normal ISD::SELECT
return DAG.getUNDEF(ValueVT);
}
- if (ValueVT.getVectorNumElements() == 1 &&
- ValueVT.getVectorElementType() != PartEVT)
- Val = DAG.getAnyExtOrTrunc(Val, DL, ValueVT.getScalarType());
+ EVT ValueSVT = ValueVT.getVectorElementType();
+ if (ValueVT.getVectorNumElements() == 1 && ValueSVT != PartEVT)
+ Val = DAG.getAnyExtOrTrunc(Val, DL, ValueSVT);
return DAG.getNode(ISD::BUILD_VECTOR, DL, ValueVT, Val);
}
Entry.Node = Src;
Args.push_back(Entry);
-
+
Entry.Ty = I.getArgOperand(2)->getType();
Entry.Node = NumElements;
Args.push_back(Entry);
-
+
Entry.Ty = Type::getInt32Ty(*DAG.getContext());
Entry.Node = ElementSize;
Args.push_back(Entry);
unsigned Opcode;
switch (Intrinsic) {
default: llvm_unreachable("Impossible intrinsic"); // Can't reach here.
- case Intrinsic::experimental_constrained_fadd:
+ case Intrinsic::experimental_constrained_fadd:
Opcode = ISD::STRICT_FADD;
break;
case Intrinsic::experimental_constrained_fsub: