[PATCH] D32756: [DAGCombine] Refactor common addcarry pattern.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 07:39:01 PDT 2017


spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2175
+   *                  /           \
+   * (addcarry 0, 0, *)  (addcarry *, 0, Z)
+   *                 \        /
----------------
I like the ascii art!

I'm still not very familiar with the carry ops, so I would've kept the formulas from the previous rev in here too. This is complicated enough that I think it's justified to have both.

But I have a question about this node: (addcarry 0, 0, *)
Can that be simplified to a cast instruction from bool to the VT of the addcarry?
If yes, if we add that simplification, will it break this pattern matching?


https://reviews.llvm.org/D32756





More information about the llvm-commits mailing list