[ARM] Lower sadd_sat to qadd8 and qadd16
authorDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 09:53:38 +0000 (09:53 +0000)
committerDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 09:53:38 +0000 (09:53 +0000)
commitfba831e791ba8978f21d2328499c8d3063401de3
tree89314fae62c596cd3bc1397367cee6ebfcb3b21b
parent5ba66fa53ba7f5c2c3e384c48a18fa7601dddd45
[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

llvm-svn: 375402
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/CodeGen/ARM/sadd_sat.ll
llvm/test/CodeGen/ARM/sadd_sat_plus.ll
llvm/test/CodeGen/ARM/ssub_sat.ll
llvm/test/CodeGen/ARM/ssub_sat_plus.ll