diff options
author | Derek Schuff <dschuff@chromium.org> | 2024-11-26 14:11:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 14:11:06 -0800 |
commit | acb12584c277d9bfb0b1c78e65101fa54e9a7361 (patch) | |
tree | 310ab60622771a7d3092c4026e7c1178fb004c3c /src/wasm2js.h | |
parent | cc97853b5f03e8c8441159e68ecb2262beee166f (diff) | |
download | binaryen-acb12584c277d9bfb0b1c78e65101fa54e9a7361.tar.gz binaryen-acb12584c277d9bfb0b1c78e65101fa54e9a7361.tar.bz2 binaryen-acb12584c277d9bfb0b1c78e65101fa54e9a7361.zip |
[wasm2js] Run LLVM nontrapping fptoint lowering when running for emscripten (#7116)
Lower away saturating fptoint operations when we know we are using
emscripten.
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r-- | src/wasm2js.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h index f81908948..7ed089448 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -361,6 +361,9 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) { // First, do the lowering to a JS-friendly subset. { PassRunner runner(wasm, options); + if (flags.emscripten) { + runner.add("llvm-nontrapping-fptoint-lowering"); + } // TODO: only legalize if necessary - emscripten would already do so, and // likely other toolchains. but spec test suite needs that. runner.add("legalize-js-interface"); |