Added option -enable-finite-only-fp-math. When on, the codegen can assume that
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28432 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 24e1e5a..28f3ae8 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -26,6 +26,7 @@
   bool NoFramePointerElim;
   bool NoExcessFPPrecision;
   bool UnsafeFPMath;
+  bool FiniteOnlyFPMath;
   Reloc::Model RelocationModel;
 };
 namespace {
@@ -48,6 +49,11 @@
                cl::desc("Enable optimizations that may decrease FP precision"),
                cl::location(UnsafeFPMath),
                cl::init(false));
+  cl::opt<bool, true>
+  EnableFiniteOnltFPMath("enable-finite-only-fp-math",
+               cl::desc("Enable optimizations that assumes non- NaNs / +-Infs"),
+               cl::location(FiniteOnlyFPMath),
+               cl::init(false));
   cl::opt<llvm::Reloc::Model, true>
   DefRelocationModel(
     "relocation-model",