[PATCH] D13733: Perform DIV, REM -> DIVREM combining for all affected nodes at once.

A. Skrobov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 05:56:30 PDT 2015


tyomitch added a comment.

In http://reviews.llvm.org/D13733#270127, @rengolin wrote:

> Now, what I don't understand is the motivation.


The motivation is to enable http://reviews.llvm.org/D13862 -- I've now set you as a reviewer there, too.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2232
@@ +2231,3 @@
+      if (UserOpc == ISD::SDIV || UserOpc == ISD::UDIV)
+        CombineTo(User, combined);
+      else if (UserOpc == ISD::SREM || UserOpc == ISD::UREM)
----------------
rengolin wrote:
> Why not getValue(0), here?
That's how it was in the original code in LegalizeDAG.cpp

I don't have a particular preference, and I don't mind changing it to getValue(0)


http://reviews.llvm.org/D13733





More information about the llvm-commits mailing list