]> granicus.if.org Git - llvm/commitdiff
Use N0 instead of N->getOperand(0) in DagCombiner::visitAdd. NFC
authorAmaury Sechet <deadalnix@gmail.com>
Thu, 2 Feb 2017 16:07:44 +0000 (16:07 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Thu, 2 Feb 2017 16:07:44 +0000 (16:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293903 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 315214385bb35313f5fc290f517cbd1543d41102..a0488e1b1ccd5f8551749973f3f30f6ecb012508 100644 (file)
@@ -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)