[PATCH] D51929: [DAGCombiner] use UADDO to optimize saturated unsigned add

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 11:35:47 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D51929#1242305, @spatel wrote:

> I'm not following the 'adc' suggestion though. That uses the carry from a previous op in the addition. What would that code sequence look like?


Uhm, after thinking a bit more, i think we'd only care about `ADD`? I haven't really thought about it though.
But in `ADC` case, i guess the same as with `ADD`, but prefixed with `CLC` <https://www.felixcloutier.com/x86/CLC.html> -> no point in using `ADC` in the first place.


https://reviews.llvm.org/D51929





More information about the llvm-commits mailing list