[PATCH] D14069: [FPEnv Core 04/14] Skip constant folding to preserve FPEnv

Steve Canon via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 08:29:51 PDT 2015


scanon added inline comments.

================
Comment at: include/llvm/Analysis/ValueTracking.h:260
@@ -260,1 +259,3 @@
+  /// lose floating-point exceptions or precision when requested via
+  /// corresponding flags) and does not have undefined behavior.
   ///
----------------
I think we should leave the one-sentence intro as-is to maximize readability; it's still correct with the new settings, AFAICT.  Then let's add a paragraph to explain the floating-point-specific details:

"If KeepExceptions is true, then speculative execution of most floating-point operations will result in observably different floating-point exceptions being raised."

Worth noting: it's not obvious that KeepRounding fits the bill for isSafeToSpeculativelyExecute, but rounding-mode does change the observable exceptions by moving the overflow/underflow boundaries.  However, that's just one small part of what you're trying to get at here with rounding, the larger part of which seems conceptually to be closer to "memory dependent" (except that the "memory" is floating-point control).


Repository:
  rL LLVM

http://reviews.llvm.org/D14069





More information about the llvm-commits mailing list