[ARM] Add qadd lowering from a sadd_sat
authorDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 12:33:46 +0000 (12:33 +0000)
committerDavid Green <david.green@arm.com>
Mon, 21 Oct 2019 12:33:46 +0000 (12:33 +0000)
commitd7b77f2203dd09e8d6ab30128cc8b8ae7313c0ee
treee81c6c81016ecc58b91a46177c83ebdc2f058ce2
parent5df90cd71c3960eb143c0d3aec03af6a7b024260
[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

llvm-svn: 375411
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/lib/Target/ARM/ARMSubtarget.h
llvm/test/CodeGen/ARM/qdadd.ll
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