[WebAssembly] Set the HasFloatingPointExceptions flag for WebAssembly.
authorDan Gohman <dan433584@gmail.com>
Thu, 2 Jul 2015 21:36:25 +0000 (21:36 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 2 Jul 2015 21:36:25 +0000 (21:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241302 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

index d569e9c624f5e48bd36897ddc847f05e99d4f2b6..4eec02efbd941bca7260fe4da8502c7d29ff183f 100644 (file)
@@ -34,7 +34,11 @@ using namespace llvm;
 
 WebAssemblyTargetLowering::WebAssemblyTargetLowering(
     const TargetMachine &TM, const WebAssemblySubtarget &STI)
-    : TargetLowering(TM), Subtarget(&STI) {}
+    : TargetLowering(TM), Subtarget(&STI) {
+  // WebAssembly does not produce floating-point exceptions on normal floating
+  // point operations.
+  setHasFloatingPointExceptions(false);
+}
 
 //===----------------------------------------------------------------------===//
 // WebAssembly Lowering private implementation.