mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.
If the subvector binop is illegal then early-out and avoid the subvector searches. llvm-svn: 367181
This commit is contained in:
parent
cd5d699ac4
commit
f05799cd65
@ -18023,13 +18023,16 @@ static SDValue narrowInsertExtractVectorBinOp(SDNode *Extract,
|
||||
SDValue Bop0 = BinOp.getOperand(0), Bop1 = BinOp.getOperand(1);
|
||||
SDValue Index = Extract->getOperand(1);
|
||||
EVT SubVT = Extract->getValueType(0);
|
||||
if (!TLI.isOperationLegalOrCustom(BinOpcode, SubVT))
|
||||
return SDValue();
|
||||
|
||||
SDValue Sub0 = getSubVectorSrc(Bop0, Index, SubVT);
|
||||
SDValue Sub1 = getSubVectorSrc(Bop1, Index, SubVT);
|
||||
|
||||
// TODO: We could handle the case where only 1 operand is being inserted by
|
||||
// creating an extract of the other operand, but that requires checking
|
||||
// number of uses and/or costs.
|
||||
if (!Sub0 || !Sub1 || !TLI.isOperationLegalOrCustom(BinOpcode, SubVT))
|
||||
if (!Sub0 || !Sub1)
|
||||
return SDValue();
|
||||
|
||||
// We are inserting both operands of the wide binop only to extract back
|
||||
|
Loading…
x
Reference in New Issue
Block a user