return getVectorVT(EltVT, EltCnt.divideCoefficientBy(2));
}
+ // Return a VT for a vector type with the same element type but
+ // double the number of elements.
+ MVT getDoubleNumVectorElementsVT() const {
+ MVT EltVT = getVectorElementType();
+ auto EltCnt = getVectorElementCount();
+ return MVT::getVectorVT(EltVT, EltCnt * 2);
+ }
+
/// Returns true if the given vector is a power of 2.
bool isPow2VectorType() const {
unsigned NElts = getVectorMinNumElements();
// TESTZ: ZF = (Op0 & Op1) == 0
// TESTC: CF = (~Op0 & Op1) == 0
// TESTNZC: ZF == 0 && CF == 0
- EVT VT = EFLAGS.getValueType();
+ MVT VT = EFLAGS.getSimpleValueType();
SDValue Op0 = EFLAGS.getOperand(0);
SDValue Op1 = EFLAGS.getOperand(1);
- EVT OpVT = Op0.getValueType();
+ MVT OpVT = Op0.getSimpleValueType();
// TEST*(~X,Y) == TEST*(X,Y)
if (SDValue NotOp0 = IsNOT(Op0, DAG)) {
Src1 = getSplitVectorSrc(peekThroughBitcasts(Src1.getOperand(0)),
peekThroughBitcasts(Src1.getOperand(1)), true);
if (Src0 && Src1) {
- EVT OpVT2 = OpVT.getDoubleNumVectorElementsVT(*DAG.getContext());
+ MVT OpVT2 = OpVT.getDoubleNumVectorElementsVT();
return DAG.getNode(EFLAGS.getOpcode(), SDLoc(EFLAGS), VT,
DAG.getBitcast(OpVT2, Src0),
DAG.getBitcast(OpVT2, Src1));