suoyuan 4a62d48549
[InstCombine] Fold zext-add/sub-min/max-trunc to uadd.sat or usub.sat (#185259)
Fixes #185244

```
trunc(umin(zext(a) + zext(b), MAX)) -> uadd.sat(a, b)
trunc(smin(zext(a) + zext(b), MAX)) -> uadd.sat(a, b)
trunc(smax(zext(a) - zext(b), 0)) --> usub.sat(a, b)
```

Proof: https://alive2.llvm.org/ce/z/K6wszu
2026-03-27 15:14:32 +01:00
..

This directory contains test cases for the instcombine transformation.  The
dated tests are actual bug tests, whereas the named tests are used to test
for features that the this pass should be capable of performing.