[PATCH] D89360: Treat constant contexts as being in the default rounding mode.

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 23:35:37 PDT 2020


sepavloff added a comment.

Probably there is an issue with code generation. The source:

  constexpr float func_01(float x, float y) {
    return x + y;
  }
  
  float V1 = func_01(1.0F, 0x0.000001p0F);

compiled with '-frounding-math' must produce dynamic initializer. It however is evaluated at compile time.



================
Comment at: clang/test/SemaCXX/rounding-math.cpp:5
+
+#define fold(x) (__builtin_constant_p(x) ? (x) : (x))
+
----------------
It is not used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89360



More information about the cfe-commits mailing list