[ARM] Lower sadd_sat to qadd8 and qadd16
commit9f4a72f0885e976cffa78a27094be2dbe6c003df
authorDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 09:53:38 +0000 (21 09:53 +0000)
committerDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 09:53:38 +0000 (21 09:53 +0000)
tree9697c179b4c9416968fde2012e1713d3ecdb9f49
parent4b014dfe842929c549835a4d7e106aa078efd2ae
[ARM] Lower sadd_sat to qadd8 and qadd16

Lower the target independent signed saturating intrinsics to qadd8 and qadd16.
This custom lowers them from a sadd_sat, catching the node early before it is
promoted. It also adds a QADD8b and QADD16b node to mean the bottom "lane" of a
qadd8/qadd16, so that we can call demand bits on it to show that it does not
use the upper bits.

Also handles QSUB8 and QSUB16.

Differential Revision: https://reviews.llvm.org/D68974

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375402 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/sadd_sat.ll
test/CodeGen/ARM/sadd_sat_plus.ll
test/CodeGen/ARM/ssub_sat.ll
test/CodeGen/ARM/ssub_sat_plus.ll