HomePhabricator

[DAGCOmbine] Ensure that (brcond (setcc ...)) is handled in a canonical manner.

Authored by Amaury Sechet <deadalnix@gmail.com> on Feb 23 2018, 3:50 AM.

Description

[DAGCOmbine] Ensure that (brcond (setcc ...)) is handled in a canonical manner.

Summary:
There are transformation that change setcc into other constructs, and transform that try to reconstruct a setcc from the brcond condition. Depending on what order these transform are done, the end result differs.

Most of the time, it is preferable to get a setcc as a brcond argument (and this is why brcond try to recreate the setcc in the first place) so we ensure this is done every time by also doing it at the setcc level when the only user is a brcond.

Reviewers: spatel, hfinkel, niravd, craig.topper

Subscribers: nhaehnle, llvm-commits

Differential Revision: https://reviews.llvm.org/D41235

llvm-svn: 325892

Event Timeline

Amaury Sechet <deadalnix@gmail.com> committed rG893a6b89ffe0: [DAGCOmbine] Ensure that (brcond (setcc ...)) is handled in a canonical manner. (authored by Amaury Sechet <deadalnix@gmail.com>).Feb 23 2018, 3:50 AM