diff --git a/cbackend.cpp b/cbackend.cpp index 499e1868..98061a95 100644 --- a/cbackend.cpp +++ b/cbackend.cpp @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +#include "ispc.h" + #include #ifndef _MSC_VER @@ -2144,6 +2146,12 @@ bool CWriter::doInitialization(llvm::Module &M) { Out << " #include \n"; Out << "#endif\n\n"; + if (g->opt.fastMath) { + Out << "#define ISPC_FAST_MATH 1\n" + } else { + Out << "#undef ISPC_FAST_MATH\n" + } + Out << "#include \"" << includeName << "\"\n"; Out << "\n/* Basic Library Function Declarations */\n";