]> granicus.if.org Git - llvm/commit
[ARM] Lower (select_cc k k (select_cc ~k ~k x)) into (SSAT l_k x)
authorPablo Barrio <pablo.barrio@arm.com>
Thu, 23 Jun 2016 16:53:49 +0000 (16:53 +0000)
committerPablo Barrio <pablo.barrio@arm.com>
Thu, 23 Jun 2016 16:53:49 +0000 (16:53 +0000)
commite8da13b383164c46b71860b1495a17acd18c5bc7
tree9ceafd1dac432233e2e33af6ec30eb3b40dd71e3
parent525757e9f74cdfe723f5cdc40b46bd3a9b6f06ed
[ARM] Lower (select_cc k k (select_cc ~k ~k x)) into (SSAT l_k x)

Summary:
SSAT saturates an integer, making sure that its value lies within
an interval [-k, k]. Since the constant is given to SSAT as the
number of bytes set to one, k + 1 must be a power of 2, otherwise
the optimization is not possible. Also, the select_cc must use <
and > respectively so that they define an interval.

Reviewers: mcrosier, jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D21372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273581 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetSelectionDAG.td
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/ssat.ll [new file with mode: 0644]