HomePhabricator

[ARM,MVE] Add intrinsics for FP rounding operations.

Authored by simon_tatham on Feb 17 2020, 9:05 AM.

Description

[ARM,MVE] Add intrinsics for FP rounding operations.

Summary:
This adds the unpredicated forms of six different MVE intrinsics which
all round a vector of floating-point numbers to integer values,
leaving them still in FP format, differing only in rounding mode and
exception settings.

Five of them map to existing target-independent intrinsics in LLVM IR,
such as @llvm.trunc and @llvm.rint. The sixth, mapping to the vrintn
instruction, is done by inventing a target-specific intrinsic.

(vrintn behaves the same as vrintx in terms of the output value:
the side effects on the FPSCR flags are the only difference between
the two. But ACLE specifies separate user-callable intrinsics for the
two, so the side effects matter enough to make sure we generate the
right one of the two instructions in each case.)

Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard

Reviewed By: miyuki

Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

Details

Committed
simon_tathamFeb 18 2020, 1:34 AM
Reviewer
miyuki
Differential Revision
D74333: [ARM,MVE] Add intrinsics for FP rounding operations.
Parents
rGdf3ed6c0fe31: [ARM,MVE] Add intrinsics for int <-> float conversion.
Branches
Unknown
Tags
Unknown