[PATCH] D40348: [PowerPC] Follow-up to r318436 to get the missed CSE opportunities

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 13:35:22 PST 2017


bogner accepted this revision.
bogner added a comment.
This revision is now accepted and ready to land.

This change is really three different changes. In general it's easier to review changes that only do one thing. The DAGCombiner change here looks correct, and I took a cursory glance at the PPC changes and didn't see anything wrong.



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11372
   deleteAndRecombine(Ptr.getNode());
+  AddToWorklist(Result.getNode());
 
----------------
This change LGTM.


================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:862-863
+  unsigned MaxTruncation = 0;
+  for (SDNode::use_iterator Use = N->use_begin(), UseEnd = N->use_end();
+       Use != UseEnd; ++Use) {
+    unsigned Opc =
----------------
This can be simplified using range-for and N->uses().


Repository:
  rL LLVM

https://reviews.llvm.org/D40348





More information about the llvm-commits mailing list