From 4cf831a651f3975c62a04bd40edeb40d2fc7485f Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 9 Sep 2011 09:32:59 -0700 Subject: [PATCH] When --fast-math is enabled, tell LLVM about it, too. --- module.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module.cpp b/module.cpp index d3dd8d85..f47f73ce 100644 --- a/module.cpp +++ b/module.cpp @@ -153,6 +153,9 @@ extern void yy_delete_buffer(YY_BUFFER_STATE); int Module::CompileFile() { + if (g->opt.fastMath == true) + llvm::UnsafeFPMath = true; + // FIXME: it'd be nice to do this in the Module constructor, but this // function ends up calling into routines that expect the global // variable 'm' to be initialized and available (which it isn't until