[PATCH] D14078: [FPEnv Core 13/14] Don't hoist FP-ops with side-effects in LICM

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 09:05:52 PDT 2015


majnemer added a subscriber: majnemer.

================
Comment at: lib/Transforms/Scalar/LICM.cpp:693-698
@@ -692,1 +692,8 @@
 
+  // isSafeToSpeculativelyExecute() is not enough, because its result is
+  // taken into account only when it's positive and we need to forbid the case
+  // where its result is negative.
+  if (const FPMathOperator *MathOp = dyn_cast<FPMathOperator>(&Inst))
+    if (MathOp->hasKeepExceptions() || MathOp->hasKeepRounding())
+      return false;
+
----------------
This doesn't make sense to me, can you please elaborate?


Repository:
  rL LLVM

http://reviews.llvm.org/D14078





More information about the llvm-commits mailing list