[ARM] Add qadd lowering from a sadd_sat
commit68b7d2e0925f44adc9e23b32c7299520702dcbe9
authorDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 12:33:46 +0000 (21 12:33 +0000)
committerDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 12:33:46 +0000 (21 12:33 +0000)
treed83d5e3cde734c7dd65c047aab2bd72a6a23e64b
parent0e61c30e7d918be651096b9bf0d9c89ca31aa094
[ARM] Add qadd lowering from a sadd_sat

This lowers a sadd_sat to a qadd by treating it as legal. Also adds qsub at the
same time.

The qadd instruction sets the q flag, but we already have many cases where we
do not model this in llvm.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375411 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/ARMSubtarget.h
test/CodeGen/ARM/qdadd.ll
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