[PATCH] D98487: [AArch64][SVE/NEON] Add support for FROUNDEVEN for both NEON and fixed length SVE

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 04:00:50 PDT 2021


paulwalker-arm added a comment.

In D98487#2625673 <https://reviews.llvm.org/D98487#2625673>, @bsmith wrote:

>> Why is this patch only changing int_aarch64_neon_frintn and not int_aarch64_sve_frintn?
>> Is there a particular reason to do so?
>
> Things are done slightly differently for SVE in this regard, in principal yes, we could emit roundeven instead of frintn from the ACLE intrinsic, however all of the other ACLE intrinsics also emit SVE specific LLVM intrinsics rather than the arch-indep nodes. This patch doesn't change that in order to stay consistent, if we did want to change that it should be done as a separate patch that changes all of them.

@CarolineConcatto There are two levels at play here.  At the top level (C->LLVM) the SVE ACLE cannot use the roundeven intrinsic because that operation takes a single data operand whereas for SVE the operation is predicated and thus also requires predicate and passthru operands (i.e. the two intrinsics are doing different things).  At the bottom level (CodeGen) we already lower scalable vector variants of both intrinsics to ISD::FROUNDEVEN_MERGE_PASSTHRU which is the "masked" version of ISD::FROUNDEVEN.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98487/new/

https://reviews.llvm.org/D98487



More information about the llvm-commits mailing list