[PATCH] D74729: [FPEnv] Intrinsic for setting rounding mode

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 11:49:25 PDT 2020


arsenm added a comment.

In D74729#2005862 <https://reviews.llvm.org/D74729#2005862>, @arsenm wrote:

> In D74729#2005777 <https://reviews.llvm.org/D74729#2005777>, @kpn wrote:
>
> > Are there GPUs or AI cores _targeted by llvm_ that support changing the rounding mode at run-time?
>
>
> AMDGPU can


Originally we had 1 instruction that can change all aspects of the FP environment (which has a heavy runtime cost). The newest subtargets also have 2 additional and faster instructions that can separately set the rounding mode, and denormal mode. Therefore the decision of how to lower this is different per-subtarget, and therefore an abstracted and legalizable intrinsic is useful


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74729





More information about the llvm-commits mailing list