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

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 14:59:52 PST 2015


joker.eph accepted this revision.
joker.eph added a comment.
This revision is now accepted and ready to land.

LGTM with the few nitpicks below.


================
Comment at: include/llvm/Analysis/ValueTracking.h:265
@@ -261,1 +264,3 @@
+  /// floating-point operations will result in observably different
+  /// floating-point exceptions being raised.
   ///
----------------
sdmitrouk wrote:
> It's left from one of previous versions, the one with function attributes. Removed.
It seems you left the doxygen change in?

================
Comment at: lib/IR/ConstantFold.cpp:1197
@@ -1193,1 +1196,3 @@
+          (FMF.noRounding() || !(*S & APFloat::opInexact)))
+        return ConstantFP::get(C1->getContext(), C3V);
     }
----------------
sweet!

================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:212
@@ -211,2 +211,3 @@
         // Does "B op C" simplify?
-        if (Value *V = SimplifyBinOp(Opcode, B, C, DL)) {
+        FastMathFlags Flags;
+        if (isa<FPMathOperator>(I))
----------------
Keep the name FMF for consistency with everywhere else.


Repository:
  rL LLVM

http://reviews.llvm.org/D14069





More information about the llvm-commits mailing list