[ARM] Lower unsigned saturation to USAT
authorFlorian Hahn <florian.hahn@arm.com>
Wed, 20 Dec 2017 11:13:57 +0000 (11:13 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Wed, 20 Dec 2017 11:13:57 +0000 (11:13 +0000)
commitc3aa6d83fd3863170e10db365e93aae7e9351efc
tree4c94236ec955b62e5c679962ed3660baad69d82f
parentcd6be960cead10b9d8c68686487f92418232c1a5
[ARM] Lower unsigned saturation to USAT

Summary:
Implement lower of unsigned saturation on an interval [0, k] where k + 1 is a power of two using USAT instruction in a similar way to how [~k, k] is lowered using SSAT on ARM models that supports it.

Patch by Marten Svanfeldt

Reviewers: t.p.northover, pbarrio, eastig, SjoerdMeijer, javed.absar, fhahn

Reviewed By: fhahn

Subscribers: fhahn, aemerson, javed.absar, llvm-commits, kristof.beyls

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

llvm-svn: 321164
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/usat.ll [new file with mode: 0644]