[PATCH] D35635: Optimize {s,u}{add,sub}.with.overflow on ARM

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 16:23:09 PDT 2017


jgalenson added a comment.

In https://reviews.llvm.org/D35635#899129, @efriedma wrote:

> > when the brcond isn't combined into a br_cc
>
> BRCOND isn't legal on ARM; it will always eventually get transformed to BR_CC.


True.  In most of my testcases, brcond is combined into br_cc, so we hit my new br_cc case.  However, one time the brcond is not combined into br_cc.  It is legalized into it shortly afterwards, but then we lower saddo/uaddo/etc. the normal way before we lower the new br_cc node (and hit my new optimized case).  That's why I needed the brcond case.

What is the best way to handle that?  Adding code to the normal saddo/etc. lowering code not to lower it if there's a br_cc seems the wrong way to go about it (and I don't think it's even possible).  And I don't know how to change the order we see nodes.


https://reviews.llvm.org/D35635





More information about the llvm-commits mailing list