summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/fp-floatcontrol-stack.cpp
AgeCommit message (Collapse)Author
2024-07-26Remove FiniteMathOnly and use only NoHonorINFs and NoHonorNANs. (#97342)Zahira Ammarguellat
Currently `__FINITE_MATH_ONLY__` is set when `FiniteMathOnly`. And `FiniteMathOnly` is set when `NoHonorInfs` && `NoHonorNans` is true. But what happens one of the latter flags is false? To avoid potential inconsistencies, the internal option `FiniteMathOnly` is removed option and the macro `__FINITE_MATH_ONLY__` is set when `NoHonorInfs` && `NoHonorNans`.
2023-11-11[clang][CodeGen] Ensure consistent `mustprogress` attribute emissionAntonio Frighetto
Emission of `mustprogress` attribute previously occurred only within `EmitFunctionBody`, after generating the function body. Other routines for function body creation may lack the attribute, potentially leading to suboptimal optimizations later in the pipeline. Attribute emission is now anticipated prior to generating the function body. Fixes: https://github.com/llvm/llvm-project/issues/69833.
2023-07-07clang: Stop emitting "strictfp"Matt Arsenault
The attribute is a proper enum attribute, strictfp. We were getting strictfp and "strictfp" set on every function with -fexperimental-strict-floating-point. https://reviews.llvm.org/D139629
2021-07-30[clang][patch][FPEnv] Fix syntax errors in pragma float_control testMelanie Blower
In a post-commit message to https://reviews.llvm.org/D102343 @MaskRay pointed out syntax errors in one of the test cases. This patch fixes those problems, I had forgotten the colon after the CHECK- strings.
2021-07-29[clang][patch][FPEnv] Make initialization of C++ globals strictfp awareMelanie Blower
@kpn pointed out that the global variable initialization functions didn't have the "strictfp" metadata set correctly, and @rjmccall said that there was buggy code in SetFPModel and StartFunction, this patch is to solve those problems. When Sema creates a FunctionDecl, it sets the FunctionDeclBits.UsesFPIntrin to "true" if the lexical FP settings (i.e. a combination of command line options and #pragma float_control settings) correspond to ConstrainedFP mode. That bit is used when CodeGen starts codegen for a llvm function, and it translates into the "strictfp" function attribute. See bugs.llvm.org/show_bug.cgi?id=44571 Reviewed By: Aaron Ballman Differential Revision: https://reviews.llvm.org/D102343
2021-03-15[clang][patch] Solve PR49479, File scope fp pragma should propagate to ↵Melanie Blower
functions nested in struct, and initialization expressions Previously, the CurFPFeatures state was set to command line settings before semantic analysis of the nested member functions and initialization expressions, that's not correct, it should use the pragma state which is in effect at the lexical position. Reviewed By: Erich Keane, Aaron Ballman Differential Revision: https://reviews.llvm.org/D98211
2020-05-20[clang] FastMathFlags.allowContract should be initialized only from ↵Melanie Blower
FPFeatures.allowFPContractAcrossStatement Summary: Fix bug introduced in D72841 adding support for pragma float_control Reviewers: rjmccall, Anastasia Differential Revision: https://reviews.llvm.org/D79903
2020-05-04Reapply "Add support for #pragma float_control" with buildbot fixesMelanie Blower
Add support for #pragma float_control Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841 This reverts commit fce82c0ed310174fe48e2402ac731b6340098389.
2020-05-01Revert "Reapply "Add support for #pragma float_control" with improvements to"Melanie Blower
This reverts commit 69aacaf699922ffe0450f567e21208c10c84731f.
2020-05-01Reapply "Add support for #pragma float_control" with improvements toMelanie Blower
test cases Add support for #pragma float_control Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841 This reverts commit 85dc033caccaa6ab919d57f9759290be41240146, and makes corrections to the test cases that failed on buildbots.
2020-05-01Revert "Add support for #pragma float_control"Melanie Blower
This reverts commit 4f1e9a17e9d28bdfd035313c96b3a5d4c91a7733. due to fail on buildbot, sorry for the noise
2020-05-01Add support for #pragma float_controlMelanie Blower
Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841