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

Fix popcnt for small integers #3617

Merged
merged 2 commits into from
Dec 17, 2021
Merged

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Dec 17, 2021

Fixes #3615

@cfallin
Copy link
Member

cfallin commented Dec 17, 2021

Thanks! Can you add some run-tests too?

@bjorn3
Copy link
Contributor Author

bjorn3 commented Dec 17, 2021

Done. Also made the existing aarch64 popcnt tests run on x86_64.

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@bjorn3
Copy link
Contributor Author

bjorn3 commented Dec 17, 2021

Would it be possible to get a patch release with #3610, this PR and maybe #3619? #3610 and this PR fix a miscompilation and I switched cg_clif back to crates.io releases after feedback from my PR to distribute cg_clif as rustup component on nightly.

@cfallin
Copy link
Member

cfallin commented Dec 17, 2021

Would it be possible to get a patch release

Yes, I think actual miscompilation merits this (for clarity to others, Wasm is not affected, just 8/16-bit types). I'll give our new semi-automated patch release process a try; right now this implies a patch release of Wasmtime as well, which will be a no-op, and we need a better story for just patching Cranelift in the future, but this will do. If there's some unexpected issue and I can't get it out in reasonable time today then the next major release on Jan 5 will include all the changes.

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Dec 17, 2021
@cfallin cfallin merged commit 1db7644 into bytecodealliance:main Dec 17, 2021
@bjorn3 bjorn3 deleted the fix_small_popcnt branch December 17, 2021 21:24
@cfallin cfallin mentioned this pull request Dec 17, 2021
bjorn3 added a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Dec 17, 2021
This reverts commit a1037fa.

There are two regressions in Cranelift with respect to small integer
operations. Both have already been fixed on thebmain branch, but we will
have to wait for a new Cranelift release. They have been fixed by
bytecodealliance/wasmtime#3610 and bytecodealliance/wasmtime#3617.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: Miscompilation of popcnt for i8/i16
2 participants