[PATCH] D126364: Fix interaction of pragma FENV_ACCESS with other pragmas
Serge Pavlov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 02:24:39 PDT 2022
sepavloff added a comment.
In D126364#3556943 <https://reviews.llvm.org/D126364#3556943>, @efriedma wrote:
> Given we have getEffectiveRoundingMode(), I think the calls to setRoundingModeOverride shouldn't be necessary? And if we drop those calls, we can also drop the IsRoundingModeSet variable.
In the block:
{
#pragma STDC FENV_ACCESS ON
fesetround(x);
...
}
floating point operations must have rounding mode `dynamic`. If handler of FENV_ACCESS does not set it, the rounding mode remains FE_TONEAREST, which is incorrect.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126364/new/
https://reviews.llvm.org/D126364
More information about the cfe-commits
mailing list