[llvm-commits] [llvm] r147728 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 7 01:42:47 PST 2012
Hi Craig,
> @@ -1656,6 +1660,51 @@
> return SDValue();
> }
>
> +SDValue DAGCombiner::visitSUBC(SDNode *N) {
> + SDValue N0 = N->getOperand(0);
> + SDValue N1 = N->getOperand(1);
> + ConstantSDNode *N0C = dyn_cast<ConstantSDNode>(N0);
> + ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
> + EVT VT = N0.getValueType();
> +
> + // If the flag result is dead, turn this into an SUB.
> + if (N->hasNUsesOfValue(0, 1))
this could be !N->hasAnyUseOfValue().
Ciao, Duncan.
More information about the llvm-commits
mailing list