HomePhabricator

[ARM] MVE saturating truncates

Authored by dmgreen on Sat, May 16, 6:54 AM.

Description

[ARM] MVE saturating truncates

This adds some custom lowering for VQMOVN, an instruction that can be
used to perform saturating truncates from a pair of min(max(X, -0x8000),
0x7fff), providing those constants are correct. This leaves a VQMOVNBs
which saturates the value and inserts that into the bottom lanes of an
existing vector. We then need to do something with the other lanes,
extending the value using a vmovlb.

Ideally, as will often be the case, only the bottom lane of what remains
will be demanded, allowing the vmovlb to be removed. Which should mean
the instruction is either equal or a win most of the time, and allows
some extra follow-up folding to happen.

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

Details

Committed
dmgreenSat, May 16, 7:10 AM
Differential Revision
D77590: [ARM] MVE saturating truncates
Parents
rG228913780b61: DIEHash.cpp - remove headers explicitly included in DIEHash.h. NFC.
Branches
Unknown
Tags
Unknown