[PATCH] D126364: Fix interaction of pragma FENV_ACCESS with other pragmas
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 11:45:39 PDT 2022
efriedma added inline comments.
================
Comment at: clang/include/clang/Basic/LangOptions.h:622
setFPContractMode(LangOptions::FPM_Off);
setRoundingMode(static_cast<RoundingMode>(LangOptions::FPR_ToNearest));
setFPExceptionMode(LangOptions::FPE_Ignore);
----------------
I'm suggesting this should be `setRoundingMode(llvm::RoundingMode::Dynamic)`.
If FENV_ACCESS is off, getEffectiveRoundingMode() converts that to "nearest". If FENV_ACCESS is turned on, the mode is treated as dynamic. This is exactly what we want.
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