Stream: git-wasmtime

Topic: wasmtime / issue #4920 [WIP] cranelift: Added fp `and`, `...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 18 2022 at 11:37):

ArtBlnd commented on issue #4920:

Kinda struggling testing with NaNs. I think I can do in 3 days.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:36):

ArtBlnd commented on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to test bitcast.i32 and bitcast.f32 first before we go.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:39):

ArtBlnd edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.i32 and bitcast.f32 first before we go.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:40):

ArtBlnd edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.ixx and bitcast.fxx first before we go.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:47):

ArtBlnd edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.uxx and bitcast.fxx first before we go.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:50):

ArtBlnd edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.ixx and bitcast.fxx first before we go.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 05:58):

ArtBlnd edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.ixx and bitcast.fxx first before we go.

also pretty much sure that fp bit ops should work like integer bit ops.

Thoughts?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:44):

afonso360 commented on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.ixx and bitcast.fxx first before we go.

I don't mind the tests with bitcast -> op -> bitcast. But what issues are you seeing with just using floats in and out?

also pretty much sure that fp bit ops should work like integer bit ops.

Agreed! I don't think any special input should cause us to deviate from that.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:44):

afonso360 edited a comment on issue #4920:

Ok, I've try testing this many times but I think its better testing with i32 to f32 bitcasts. to do that. we need to implement and test bitcast.ixx and bitcast.fxx first before we go.

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

also pretty much sure that fp bit ops should work like integer bit ops.

Agreed! I don't think any special input should cause us to deviate from that.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:51):

ArtBlnd commented on issue #4920:

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

We can't check sign value of float in NaN payload. I think its better using bitcast to test it.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:51):

ArtBlnd edited a comment on issue #4920:

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

We can't check sign flag of float in NaN payload. I think its better using bitcast to test it.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:54):

ArtBlnd edited a comment on issue #4920:

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

We can't check sign flag of float in NaN payload. I think its better using bitcast to test it. because its bitcast. the sign flag should not optimized away.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:54):

ArtBlnd edited a comment on issue #4920:

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

We can't check sign flag of float in NaN payload. I think its better using bitcast to test it. because its bitcast. the sign flag should not optimized away. (while NaN -> Integer casting?)

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 08:57):

ArtBlnd edited a comment on issue #4920:

I don't mind the tests with bitcast -> op -> bitcast (although I would slightly prefer them without). But what issues are you seeing with just using floats in and out?

We can't check sign flag of float in NaN payload. I think its better using bitcast to test it. because its bitcast. the sign flag should not optimized away. (while NaN -> Integer casting?)

thats why I added i32 -> f32 -> i32 test on cast implementation.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 09:05):

afonso360 commented on issue #4920:

In our runtest suite we do bit comparisions of float output, so you should be able to pass in a sNaN and compare a sNaN output.

We do that in other tests, see for example fcopysign which is also a "bitwise" op:
https://github.com/bytecodealliance/wasmtime/blob/a434f43d2276dd30dab26cfeaa4103f337557f17/cranelift/filetests/filetests/runtests/fcopysign.clif#L39-L55

view this post on Zulip Wasmtime GitHub notifications bot (Sep 20 2022 at 09:07):

afonso360 edited a comment on issue #4920:

In our runtest suite we do bit comparisions of float output, so you should be able to pass in a sNaN and compare a sNaN output.

We do that in other tests, see for example fcopysign which is also a "bitwise" op:
https://github.com/bytecodealliance/wasmtime/blob/a434f43d2276dd30dab26cfeaa4103f337557f17/cranelift/filetests/filetests/runtests/fcopysign.clif#L39-L55

Edit:

I think its better using bitcast to test it. because its bitcast. the sign flag should not optimized away. (while NaN -> Integer casting?)

Although yes, we should also check that for bitcasts, they also shouldn't silence any signal bits.


Last updated: Dec 23 2024 at 12:05 UTC