Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm2js] Run LLVM nontrapping fptoint lowering when running for emscripten #7116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Nov 26, 2024

Lower away saturating fptoint operations when we know we are using emscripten.

…ripten

Lower away saturating fptoint operations when we know we are using emscripten.
@dschuff
Copy link
Member Author

dschuff commented Nov 26, 2024

This is needed to pass some wasm2js tests in Emscripten. The alternative would be to implement full support for nontrapping fp operations in wasm2js, but I don't have a good sense for how much work that would be.

@dschuff dschuff requested a review from kripken November 26, 2024 01:50
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % test

@@ -0,0 +1,564 @@
(module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be output files to check in with this, something like FILENAME.2asm.js.*.

But, for a test, maybe add just a minimal file with one fptoint operation? I don't think we need to add coverage for the entire set of instructions, which the pass has tests for. We mainly want to test that the pass runs. Unless there is a benefit I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants