From 44bc052f4d866f4e5885a22d23ed9ccef77e30df Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 2 Jul 2015 21:36:25 +0000 Subject: [PATCH] [WebAssembly] Set the HasFloatingPointExceptions flag for WebAssembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241302 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index d569e9c624f..4eec02efbd9 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -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. -- 2.34.1