When creating a new vector type based on another vector type we
should pass in the element count instead of the number of elements
and scalable flag separately.
I encountered this warning whilst compiling this test:
CodeGen/AArch64/sve-intrinsics-int-compares.ll
Differential revision: https://reviews.llvm.org/D80621
Op.getOperand(1).getValueType().isScalableVector() &&
"Only scalable vectors are supported");
- auto PredTy = VT.getVectorVT(*DAG.getContext(), MVT::i1,
- VT.getVectorNumElements(), true);
+ auto PredTy =
+ VT.getVectorVT(*DAG.getContext(), MVT::i1, VT.getVectorElementCount());
SDValue Mask = getPTrue(DAG, DL, PredTy, AArch64SVEPredPattern::all);
SmallVector<SDValue, 4> Operands = {Mask};