[PATCH] D31403: [SDAG] Deal with deleted node in PromoteIntShiftOp

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 12:57:59 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1156
     else if (Opc == ISD::SRL)
-      N0 = ZExtPromoteOperand(Op.getOperand(0), PVT);
+      N0 = ZExtPromoteOperand(N0, PVT);
     else
----------------
These N0 arg changes should probably be done as a NFCI commit now


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1172
+    // Deal with Op being deleted.
+    if (Op.getNode() && Op.getOpcode() != ISD::DELETED_NODE)
+      return RV;
----------------
```
if (Op && Op.getOpcode() != ISD::DELETED_NODE)
```


https://reviews.llvm.org/D31403





More information about the llvm-commits mailing list