[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

Cameron McInally via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 20 17:04:26 PST 2018


cameron.mcinally added a comment.

In https://reviews.llvm.org/D53157#1304880, @hfinkel wrote:

> In https://reviews.llvm.org/D53157#1304873, @cameron.mcinally wrote:
>
> > I'd like to hear more about this. The fesetexcept(...) function and friends change the FPEnv state, which can change the semantics for the instructions that follow. They definitely have to act as a barrier.
>
>
> There's no sense in which we can have a code-motion barrier within a function that acts on the regular FP instructions. We can have a barrier for the constrained intrinsics. This is why we need, in this design, for any function that uses FENV_ACCESS=ON for any part of it, to always use the constrained instrinsics.


Thanks. Ulrich's description helped me see the problem.


https://reviews.llvm.org/D53157





More information about the cfe-commits mailing list