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

pulley: Make canonicalize-nan.wast pass #9896

Closed
wants to merge 4 commits into from

Conversation

eagr
Copy link
Contributor

@eagr eagr commented Dec 23, 2024

Helps #9783

@eagr eagr requested review from a team as code owners December 23, 2024 14:30
@eagr eagr requested review from cfallin and removed request for a team December 23, 2024 14:30
@eagr eagr requested a review from a team as a code owner December 23, 2024 14:32
@eagr eagr requested review from pchickey and removed request for a team December 23, 2024 14:32
@eagr
Copy link
Contributor Author

eagr commented Dec 23, 2024

cargo run --features pulley -- wast --target pulley64 ./tests/misc_testsuite/simd/canonicalize-nan.wast -W nan-canonicalization

Seems passing. Is it how the test supposed to run?

About the fn naming, I'm just kinda going along with veq32x4 and friends. If you'd prefer, say, vlef32x4 over vlteqf32x4, or vueqf64x2 over vunoeqf64x2, I'm happy to change them.

And I haven't implemented all the float condcodes, just enough to get the tests pass. I did skim through the docs, but I don't believe I understand half of the implications. It'd great to hear your inputs before I proceed implementing others.

cc @alexcrichton

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator pulley Issues related to the Pulley interpreter labels Dec 23, 2024
Copy link

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "cranelift", "pulley"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: pulley

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton
Copy link
Member

Thanks for this! I think it might be best to cut down on some of these opcodes in Pulley though since wasm doesn't actually use many of the FloatCC::Unordered* orderings for example. I'd recommend having a pulley opcode for wasm-based orderings but those needed only for nan canonicalization for example I think should be implemented like other lowering rules on other platforms (e.g. using combinations of opcodes instead of one). If this ever becomes performance sensitive we can of course revisit.

I'd recommend taking a look at how the riscv64 backend does this for example

@alexcrichton
Copy link
Member

Oh I'll also note that another example is in #9884 (which I'm happy to merge your PR before mind and rebase around yours), which has another possible strategy for implementing some comparison-related opcodes here.

@eagr
Copy link
Contributor Author

eagr commented Dec 27, 2024

I didn't notice your PR. I couldn't see this one is contributing anything on top of yours, so I guess it's faster to just close this one to get out of the way. :)

@eagr eagr closed this Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator pulley Issues related to the Pulley interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants