SuccessChanges

Summary

  1. [InstCombine] Add extra tests for overflow_to_sat.ll. NFC (details)
  2. [InstCombine] Canonicalize sadd.with.overflow with clamp to sadd.sat (details)
  3. [InstCombine] Canonicalize ssub.with.overflow with clamp to ssub.sat (details)
Commit 7bed2cb8535085cf041f6f5d0c65135a898c302e by david.green
[InstCombine] Add extra tests for overflow_to_sat.ll. NFC
The file was modifiedllvm/test/Transforms/InstCombine/overflow_to_sat.ll
Commit 03fce6b12e677144968045288df60da92fea2968 by david.green
[InstCombine] Canonicalize sadd.with.overflow with clamp to sadd.sat
This adds to D69245, adding extra signed patterns for folding from a
sadd_with_overflow to a sadd_sat. These are more complex than the
unsigned patterns, as the overflow can occur in either direction.
For the add case, the positive overflow can only occur if both of the
values are positive (same for both the values being negative). So there
is an extra select on whether to use the positive or negative overflow
limit.
Differential Revision: https://reviews.llvm.org/D69252
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/overflow_to_sat.ll
Commit 08390c52a2902502cd9b25472aa4c6380230c18e by david.green
[InstCombine] Canonicalize ssub.with.overflow with clamp to ssub.sat
Working on top of D69252, this adds canonicalisation patterns for
ssub.with.overflow to ssub.sats.
Differential Revision: https://reviews.llvm.org/D69753
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/overflow_to_sat.ll