[InstCombine] Extra combine for uadd_sat
authorDavid Green <david.green@arm.com>
Sun, 20 Oct 2019 10:28:33 +0000 (11:28 +0100)
committerDavid Green <david.green@arm.com>
Mon, 28 Oct 2019 15:21:16 +0000 (15:21 +0000)
commitbf21f0d489fb461a8eeb4d6342d28ed2c6e4048d
tree0de5001abd0788d689e5ba0c5979e6eeab619d59
parentd157a9bc8ba1085cc4808c6941412322a7fd884e
[InstCombine] Extra combine for uadd_sat

This is an extra fold for a canonical form of uadd_sat, as shown in
D68651. It essentially selects uadd from an add and a select.

Differential Revision: https://reviews.llvm.org/D69244
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/saturating-add-sub.ll