[ARM] Recognize SSAT and USAT from SMIN/SMAX
authorDavid Green <david.green@arm.com>
Wed, 23 Feb 2022 08:55:54 +0000 (08:55 +0000)
committerDavid Green <david.green@arm.com>
Wed, 23 Feb 2022 08:55:54 +0000 (08:55 +0000)
commita10789d6cda71cd2ea13309fd6daf854d44e0906
treed79e1c0c8a316febc554a2b2814b4844f176ac06
parent65dc78d63ee2eb20fbed54401091f08a685ef8c1
[ARM] Recognize SSAT and USAT from SMIN/SMAX

We have some recognition of SSAT and USAT from SELECT_CC at the moment.
This extends the matching to SMIN/SMAX which can help catch more cases,
either from min/max being the canonical form in instcombine or from some
expanded nodes like fp_to_si_sat.

Differential Revision: https://reviews.llvm.org/D119819
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/fpclamptosat.ll
llvm/test/CodeGen/ARM/sadd_sat.ll
llvm/test/CodeGen/ARM/sadd_sat_plus.ll
llvm/test/CodeGen/ARM/ssat-unroll-loops.ll
llvm/test/CodeGen/ARM/ssat.ll
llvm/test/CodeGen/ARM/ssub_sat.ll
llvm/test/CodeGen/ARM/ssub_sat_plus.ll
llvm/test/CodeGen/ARM/usat.ll