[llvm] r293903 - Use N0 instead of N->getOperand(0) in DagCombiner::visitAdd. NFC
Amaury Sechet via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 08:07:44 PST 2017
Author: deadalnix
Date: Thu Feb 2 10:07:44 2017
New Revision: 293903
URL: http://llvm.org/viewvc/llvm-project?rev=293903&view=rev
Log:
Use N0 instead of N->getOperand(0) in DagCombiner::visitAdd. NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=293903&r1=293902&r2=293903&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Feb 2 10:07:44 2017
@@ -1875,7 +1875,7 @@ SDValue DAGCombiner::visitADD(SDNode *N)
// and similar xforms where the inner op is either ~0 or 0.
if (NumSignBits == DestBits &&
isOneConstantOrOneSplatConstant(N1->getOperand(1)))
- return DAG.getNode(ISD::SUB, DL, VT, N->getOperand(0), AndOp0);
+ return DAG.getNode(ISD::SUB, DL, VT, N0, AndOp0);
}
// add (sext i1), X -> sub X, (zext i1)
More information about the llvm-commits
mailing list