[ARM] Lower sadd_sat to qadd8 and qadd16
commit32893f05023880a92132df22fff315abeb241638
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
parent7f7fc30dedbd7c9396c434e1bd5692d5acd19974
[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