if (ForceV2Zero)
V2 = getZeroVector(VT, Subtarget, DAG, DL);
+ unsigned NumElts = VT.getVectorNumElements();
+
switch (VT.SimpleTy) {
case MVT::v4i64:
case MVT::v8i32:
return Masked;
if (Subtarget.hasBWI() && Subtarget.hasVLX()) {
- MVT IntegerType =
- MVT::getIntegerVT(std::max((int)VT.getVectorNumElements(), 8));
+ MVT IntegerType = MVT::getIntegerVT(std::max<unsigned>(NumElts, 8));
SDValue MaskNode = DAG.getConstant(BlendMask, DL, IntegerType);
return getVectorMaskingNode(V2, MaskNode, V1, Subtarget, DAG);
}
// Otherwise load an immediate into a GPR, cast to k-register, and use a
// masked move.
- MVT IntegerType =
- MVT::getIntegerVT(std::max((int)VT.getVectorNumElements(), 8));
+ MVT IntegerType = MVT::getIntegerVT(std::max<unsigned>(NumElts, 8));
SDValue MaskNode = DAG.getConstant(BlendMask, DL, IntegerType);
return getVectorMaskingNode(V2, MaskNode, V1, Subtarget, DAG);
}