[PATCH] D80315: Fix CC1 command line options mapping into fast-math flags.

Michele Scandale via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 10:54:53 PDT 2020


michele.scandale marked an inline comment as done.
michele.scandale added inline comments.


================
Comment at: clang/test/CodeGenOpenCL/relaxed-fpmath.cl:14
   // FINITE: fdiv nnan ninf float
-  // UNSAFE: fdiv nnan nsz float
+  // UNSAFE: fdiv reassoc nsz arcp afn float
   // MAD: fdiv float
----------------
This change is based on the following:
* `-cl-fast-relaxed-math` = `-cl-unsafe-math-optimizations` + `-cl-finite-math-only` 
* the GCC option `-funsafe-math-optimizations` and `-cl-unsafe-math-optimizations` are described with very similar wording and from the GCC description states explicitly mention that no signed zeros, reassociation and reciprocals are enabled, but there is no mention to assuming that NaNs do not exist.

See https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clBuildProgram.html and https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80315





More information about the cfe-commits mailing list