Skip to content
Commit ffe05dd1 authored by Nikita Popov's avatar Nikita Popov
Browse files

[InstCombine] usub.sat(a, b) + b => umax(a, b) (PR42178)

Fixes https://bugs.llvm.org/show_bug.cgi?id=42178 by folding
usub.sat(a, b) + b to umax(a, b). The backend will expand umax
back to usubsat if that is profitable.

We may also want to handle uadd.sat(a, b) - b in the future.

Differential Revision: https://reviews.llvm.org/D63060
parent 6aa7228a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment