-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Incorrect codegen for i16x8.extmul_high_i8x16_s on x64 #3089
Comments
When I looked at the spec tests it looks like they never exercised the upper/lower halves actually being different. It appeared that if an engine implemented the these two instructions in the same way it'd pass the spec tests (not that wasmtime does this, and agreed that the spec tests should improve to catch this) |
Yes .. I think a lot of spec tests are inadequate. For this one I modified parts of my implementation to do an incorrect lowering and it would still pass. Didn't want to not push it though due to limited spec tests since it's not the only one. |
I'll try to fix .. If I can't in the next 30 min I'll revert since I won't have much other time before this evening. |
Oh I don't think there's any need to revert, I just wanted to report this to have it on file! |
@alexcrichton Yes ... thanks Alex. I guess it isn't that serious but it may be a second before I get the fix. @abrown is right, I noticed the spec tests were inadequate but that didn't mean the lowering wasn't sound. Need simd fuzz testing. Also, I had trouble printing out the sequence .. passing --set has_ssse3=true --set has_sse41=true was an issue for the command: "RUST_LOG=DEBUG cargo run -- wasm --target x86_64 --set has_ssse3=true --set has_sse41=true -dDpv vcode_x64_examples.wat.bak". Related .. do you know how to pass more than one architecture to cranelift. |
@alexcrichton Nevermind. Just got the command with @abrown. This is good: cargo run -p cranelift-tools -- wasm --set="enable_simd=true" --target x86_64 -dDv scratch.wat has_* is needed no more. |
@sparker-arm, you should check this test case before merging #3070. |
In testing I think that this is also an issue for the unsigned variant -- |
Hi all @alexcrichton @sparker-arm @abrown. I saw this error during my refactoring of the the extmul patch which may have introduced an incorrect lowering for i16x8.extmul_high_i8x16_u:
And based on the error assumed it was unrelated to the patch. Is it possible that the failed sending is related to this patch that has an incorrect lowering? If so then perhaps I can just submit a patch to ignore this test path or at least market it as should panic on x64? Also,
Did not work for allowing multiple ISA requirements (such as both sse41 and ssse3). Is there a way to specify this on the command line? |
Nah the send error is a Cargo bug that should be fixed on nightly soon, as for ISA requirements I'm not sure myself, I don't know much about the cranelift tools :( |
Also submitted a pr here: WebAssembly/testsuite#41 for an update of the spec tests. |
I think this has since been fixed. |
I was writing some tests for Rust's simd support recently and I think that the codegen for one of the recently added extmul instructions may be incorrect:
It looks like these two instructions are producing the same result, but I don't think they should be the same?
cc @jlb6740 @abrown
The text was updated successfully, but these errors were encountered: