[InstCombine] Add call to matchSAddSubSat from min/max
authorDavid Green <david.green@arm.com>
Sun, 15 Aug 2021 16:25:16 +0000 (17:25 +0100)
committerDavid Green <david.green@arm.com>
Sun, 15 Aug 2021 16:25:16 +0000 (17:25 +0100)
commitc6b7db015f6e203b3f1b1bb9f1468196a9fe7328
tree843f6637de2809449e8b483eee8d49c75fc470e5
parent3d9beefc7d713ad8462d92427ccd17b9532ce904
[InstCombine] Add call to matchSAddSubSat from min/max

This adds a call to matchSAddSubSat from smin/smax instrinsics, allowing
the same patterns to match if the canonical form of a min/max is an
intrinsics, not a icmp/select.

Differential Revision: https://reviews.llvm.org/D108077
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/sadd_sat.ll