[PATCH] D107994: Making the code compliant to the documentation about Floating Point support default values for C/C++. FPP-MODEL=PRECISE enables FFP-CONTRACT (FMA is enabled).

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 8 07:53:04 PST 2021


thakis added a comment.

This fixes tests on macOS, but I don't know if the space is there intentionally to check for presence of any attributes:

  % git diff
  diff --git a/clang/test/CodeGen/ffp-contract-option.c b/clang/test/CodeGen/ffp-contract-option.c
  index 04d23d5f90b7..327722f56f4e 100644
  --- a/clang/test/CodeGen/ffp-contract-option.c
  +++ b/clang/test/CodeGen/ffp-contract-option.c
  @@ -63,7 +63,7 @@
   // RUN: --check-prefixes=CHECK,CHECK-FPC-ON
  
   float mymuladd(float x, float y, float z) {
  -  // CHECK: define {{.*}} float @mymuladd(float noundef %x, float noundef %y, float noundef %z)
  +  // CHECK: define{{.*}} float @mymuladd(float noundef %x, float noundef %y, float noundef %z)
     return x * y + z;
     // expected-warning{{overriding '-ffp-contract=fast' option with '-ffp-contract=on'}}
  
  diff --git a/clang/test/CodeGen/ffp-model.c b/clang/test/CodeGen/ffp-model.c
  index ee0eedb2718f..98d31106a119 100644
  --- a/clang/test/CodeGen/ffp-model.c
  +++ b/clang/test/CodeGen/ffp-model.c
  @@ -19,7 +19,7 @@
   // RUN: --check-prefixes CHECK,CHECK-FAST1
  
   float mymuladd(float x, float y, float z) {
  -  // CHECK: define {{.*}} float @mymuladd(float noundef %x, float noundef %y, float noundef %z)
  +  // CHECK: define{{.*}} float @mymuladd(float noundef %x, float noundef %y, float noundef %z)
     return x * y + z;
     // CHECK-FAST: fmul fast float

If this is the right fix, please land it. Else I'll revert again in 30 min or so; bots have been broken for hours by now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107994



More information about the cfe-commits mailing list