================
@@ -816,6 +816,11 @@ class FPOptions {
     setAllowFPReassociate(LO.AllowFPReassoc);
     setNoHonorNaNs(LO.NoHonorNaNs);
     setNoHonorInfs(LO.NoHonorInfs);
+    // Ensure that if FiniteMathOnly is enabled, NoHonorNaNs and NoHonorInfs 
are
+    // also enabled. This is because FiniteMathOnly mode assumes no NaNs or 
Infs
+    // are present in computations.
+    assert((LO.FiniteMathOnly == (LO.NoHonorInfs && LO.NoHonorNaNs)) &&
----------------
zahiraam wrote:

@AnastasiaStulova thanks for the review.
The driver option `-cl-finite-math-only` can still be used.
Updated the PR's description.

https://github.com/llvm/llvm-project/pull/97342
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to