bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.81k stars 1.24k forks source link

Add support for fmsub and fnmsub instructions on x86 #8888

Open UnlimitedHummus opened 2 days ago

UnlimitedHummus commented 2 days ago

Issue #8602

Allows generating fmsub and fnmsub instructions as mentioned in the issue.

UnlimitedHummus commented 1 day ago

Sure, I'll add the runtime tests later, when I have time.

afonso360 commented 1 day ago

We already have some run tests that run on all arch's here (1, 2, 3). None of them test load sinking, so that would be a nice addition.

UnlimitedHummus commented 11 hours ago

To add runtime tests for load sinking, I would just duplicate some existing testcases and add loads to them. This doesn't test that the load is actually sunk, but rather that the results are still correct with load sinking. Is that the intention? Or am I missing some different type of testcase I could write?

fitzgen commented 11 hours ago

That is a good thing to test, but generally I was just asking for runtests that check that the new lowerings that turn multiple clif instructions into a single machine instruction produce the same values that interpreting the individual clif instructions would.

See for example

https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/filetests/filetests/runtests/iabs.clif#L1-L18

although we only care about the interpreter and x86-64 here.