[PATCH] D58874: [DAGCombiner] fold (add (add (xor a, -1), b), 1) -> (sub b, a)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 3 07:49:17 PST 2019


spatel added a comment.

If this pattern can emerge during legalization, then yes, we want a DAG combine for it. There's also a question raised in the IR version of the patch (D58877 <https://reviews.llvm.org/D58877>) about a reassociated version of this pattern. We don't have a dedicated reassociation pass for SDAG, so DAGCombine is responsible for handling that pattern too. Do we already have it, or should it be added too (as a separate DAG patch)?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58874/new/

https://reviews.llvm.org/D58874





More information about the llvm-commits mailing list