[PATCH] D72841: Add support for pragma float_control, to control precision and exception behavior at the source level

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 03:44:05 PDT 2020


uabelho added a comment.

It seems to be this change in SemaStmt.cpp that makes the FENV-pragma have some effect regardless of the warning saying that the pragma  doesn't have any effect:

  index aa0d89ac09c3..f76994a6dab3 100644
  @@ -394,6 +394,11 @@ StmtResult Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                                      ArrayRef<Stmt *> Elts, bool isStmtExpr) {
     const unsigned NumElts = Elts.size();
   
  +  // Mark the current function as usng floating point constrained intrinsics
  +  if (getCurFPFeatures().isFPConstrained())
  +    if (FunctionDecl *F = dyn_cast<FunctionDecl>(CurContext))
  +      F->setUsesFPIntrin(true);
  +


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72841





More information about the llvm-commits mailing list