[all-commits] [llvm/llvm-project] ffe05d: [InstCombine] usub.sat(a, b) + b => umax(a, b) (PR...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Aug 28 12:52:57 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ffe05dd12593f979f235cd34fd467a4c30e051f8
https://github.com/llvm/llvm-project/commit/ffe05dd12593f979f235cd34fd467a4c30e051f8
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-08-28 (Fri, 28 Aug 2020)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/saturating-add-sub.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list