@@ -11814,8 +11814,7 @@ static SDValue PerformADDCombine(SDNode *N,
11814
11814
/// PerformSUBCombine - Target-specific dag combine xforms for ISD::SUB.
11815
11815
///
11816
11816
static SDValue PerformSUBCombine(SDNode *N,
11817
- TargetLowering::DAGCombinerInfo &DCI,
11818
- const ARMSubtarget *Subtarget) {
11817
+ TargetLowering::DAGCombinerInfo &DCI) {
11819
11818
SDValue N0 = N->getOperand(0);
11820
11819
SDValue N1 = N->getOperand(1);
11821
11820
@@ -11824,27 +11823,7 @@ static SDValue PerformSUBCombine(SDNode *N,
11824
11823
if (SDValue Result = combineSelectAndUse(N, N1, N0, DCI))
11825
11824
return Result;
11826
11825
11827
- if (!Subtarget->hasMVEIntegerOps() || !N->getValueType(0).isVector())
11828
- return SDValue();
11829
-
11830
- // Fold (sub (ARMvmovImm 0), (ARMvdup x)) -> (ARMvdup (sub 0, x))
11831
- // so that we can readily pattern match more mve instructions which can use
11832
- // a scalar operand.
11833
- SDValue VDup = N->getOperand(1);
11834
- if (VDup->getOpcode() != ARMISD::VDUP)
11835
- return SDValue();
11836
-
11837
- SDValue VMov = N->getOperand(0);
11838
- if (VMov->getOpcode() == ISD::BITCAST)
11839
- VMov = VMov->getOperand(0);
11840
-
11841
- if (VMov->getOpcode() != ARMISD::VMOVIMM || !isZeroVector(VMov))
11842
- return SDValue();
11843
-
11844
- SDLoc dl(N);
11845
- SDValue Negate = DCI.DAG.getNode(ISD::SUB, dl, MVT::i32, VMov->getOperand(0),
11846
- VDup->getOperand(0));
11847
- return DCI.DAG.getNode(ARMISD::VDUP, dl, N->getValueType(0), Negate);
11826
+ return SDValue();
11848
11827
}
11849
11828
11850
11829
/// PerformVMULCombine
@@ -14529,7 +14508,7 @@ SDValue ARMTargetLowering::PerformDAGCombine(SDNode *N,
14529
14508
case ARMISD::ADDE: return PerformADDECombine(N, DCI, Subtarget);
14530
14509
case ARMISD::UMLAL: return PerformUMLALCombine(N, DCI.DAG, Subtarget);
14531
14510
case ISD::ADD: return PerformADDCombine(N, DCI, Subtarget);
14532
- case ISD::SUB: return PerformSUBCombine(N, DCI, Subtarget );
14511
+ case ISD::SUB: return PerformSUBCombine(N, DCI);
14533
14512
case ISD::MUL: return PerformMULCombine(N, DCI, Subtarget);
14534
14513
case ISD::OR: return PerformORCombine(N, DCI, Subtarget);
14535
14514
case ISD::XOR: return PerformXORCombine(N, DCI, Subtarget);
@@ -14887,9 +14866,6 @@ bool ARMTargetLowering::shouldSinkOperands(Instruction *I,
14887
14866
case Instruction::Mul:
14888
14867
return true;
14889
14868
case Instruction::Sub:
14890
- case Instruction::Shl:
14891
- case Instruction::LShr:
14892
- case Instruction::AShr:
14893
14869
return Operand == 1;
14894
14870
default:
14895
14871
return false;
0 commit comments