forked from OSchip/llvm-project
[X86] Merge extract_subvector(*_EXTEND) and extract_subvector(*_EXTEND_VECTOR_INREG) handling. NFCI.
llvm-svn: 363808
This commit is contained in:
parent
8a2bd361eb
commit
2b309027ed
|
@ -43538,26 +43538,22 @@ static SDValue combineExtractSubvector(SDNode *N, SelectionDAG &DAG,
|
|||
return DAG.getNode(X86ISD::VFPEXT, SDLoc(N), VT, InVec.getOperand(0));
|
||||
}
|
||||
}
|
||||
if ((InOpcode == ISD::ANY_EXTEND || InOpcode == ISD::ZERO_EXTEND ||
|
||||
InOpcode == ISD::SIGN_EXTEND) &&
|
||||
if ((InOpcode == ISD::ANY_EXTEND ||
|
||||
InOpcode == ISD::ANY_EXTEND_VECTOR_INREG ||
|
||||
InOpcode == ISD::ZERO_EXTEND ||
|
||||
InOpcode == ISD::ZERO_EXTEND_VECTOR_INREG ||
|
||||
InOpcode == ISD::SIGN_EXTEND ||
|
||||
InOpcode == ISD::SIGN_EXTEND_VECTOR_INREG) &&
|
||||
VT.is128BitVector() &&
|
||||
InVec.getOperand(0).getSimpleValueType().is128BitVector()) {
|
||||
unsigned ExtOp;
|
||||
unsigned ExtOp = InOpcode;
|
||||
switch (InOpcode) {
|
||||
default: llvm_unreachable("Unknown extension opcode");
|
||||
case ISD::ANY_EXTEND: ExtOp = ISD::ANY_EXTEND_VECTOR_INREG; break;
|
||||
case ISD::SIGN_EXTEND: ExtOp = ISD::SIGN_EXTEND_VECTOR_INREG; break;
|
||||
case ISD::ZERO_EXTEND: ExtOp = ISD::ZERO_EXTEND_VECTOR_INREG; break;
|
||||
}
|
||||
return DAG.getNode(ExtOp, SDLoc(N), VT, InVec.getOperand(0));
|
||||
}
|
||||
if ((InOpcode == ISD::ANY_EXTEND_VECTOR_INREG ||
|
||||
InOpcode == ISD::ZERO_EXTEND_VECTOR_INREG ||
|
||||
InOpcode == ISD::SIGN_EXTEND_VECTOR_INREG) &&
|
||||
VT.is128BitVector() &&
|
||||
InVec.getOperand(0).getSimpleValueType().is128BitVector()) {
|
||||
return DAG.getNode(InOpcode, SDLoc(N), VT, InVec.getOperand(0));
|
||||
}
|
||||
}
|
||||
|
||||
return SDValue();
|
||||
|
|
Loading…
Reference in New Issue