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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 17:33:08 PDT 2017


efriedma added a comment.

> but then we lower saddo/uaddo/etc. the normal way before we lower the new br_cc node

Oh, hmm, someone else hit the same issue recently (in a different context). It should be possible to fix; SelectionDAG::Legalize is the relevant code.  It doesn't quite work the way you want it to because we don't update the ordering when we add new nodes to the DAG.  But I haven't thought through how to compute the right order to visit without recomputing the entire topological order from scratch.

Alternatively, you could try DAGCombining ARMISD::BRCOND after legalization?


https://reviews.llvm.org/D35635





More information about the llvm-commits mailing list