[PATCH] D29587: [DAGCombiner] mulhi + 1 never overflow.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 14:45:25 PST 2017


deadalnix added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2781
+      (~N1Zero & 0x01) == ~N1Zero)
+    return OFK_Never;
+
----------------
efriedma wrote:
> Another question: is there some reason to expect that N0 is the multiply, rather than N1?
The specific case I'm looking at is fma like construct on big ints. After legalization you end up with combination of adde and mulhi no the left hand side. But indeed, that's an option to do it the other way around.


https://reviews.llvm.org/D29587





More information about the llvm-commits mailing list