Stream: git-wasmtime

Topic: wasmtime / PR #3681 cranelift: port `sshr` to ISLE on x64


view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 19:50):

fitzgen opened PR #3681 from port-sshr-to-isle to main:

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 19:50):

fitzgen requested alexcrichton for a review on PR #3681.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 20:04):

fitzgen updated PR #3681 from port-sshr-to-isle to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 21:09):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 21:09):

alexcrichton created PR review comment:

I think that imm8_from_value isn't the right thing here in the sense that all constants work with this instruction, Cranelift's semantics are just to mask off everything except the low bits. (or at least I think that's what this previously did)

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 21:09):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 21:09):

alexcrichton created PR review comment:

Similar to above I think that put_in_imm8_reg isn't what we want here in the sense that it doesn't work for constants bigger than 8 bits, but for those constants we can mask off the upper bits?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 21:09):

alexcrichton created PR review comment:

Should this add be masked with 0xf? (I realize the previous code didn't do this but is that a bug?)

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 22:20):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 22:20):

fitzgen created PR review comment:

x64 will automatically mask it for us: https://www.felixcloutier.com/x86/psraw:psrad:psraq#psraw--with-64-bit-operand-

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:01):

fitzgen updated PR #3681 from port-sshr-to-isle to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:01):

fitzgen requested alexcrichton for a review on PR #3681.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:10):

fitzgen updated PR #3681 from port-sshr-to-isle to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:12):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:12):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:12):

alexcrichton created PR review comment:

Oh sorry I meant to ask earlier, but what's this doing?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:12):

alexcrichton created PR review comment:

The register allocation here seems kinda poort where the movdqa here isn't present in the original code, and there's also an extra movdqa after the psraw. Would reordering the instructions in isle help at all?

I dunno how to keep track of "well regalloc2 will probably fix that" style things.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:12):

alexcrichton created PR review comment:

IIRC we there's usage of (def_inst (iconst N)) in other places, should that be used here or should other places be switched to this?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:21):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:21):

fitzgen created PR review comment:

Oh this is just bumping the time limit for each individual test. If I run with RUST_LOG=trace then I was running into the time limit for run tests.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:22):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:22):

fitzgen created PR review comment:

I can poke at reordering the instructions, but I also think it isn't the biggest deal. We have a few tests that get a couple extra moves and also a few tests where we now elide a couple moves that we used to make. Overall I think it is pretty much a wash.

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

fitzgen updated PR #3681 from port-sshr-to-isle to main.

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

fitzgen updated PR #3681 from port-sshr-to-isle to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:39):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:39):

fitzgen created PR review comment:

Managed to get it down to 12 instructions, instead of 13. Still one additional move compared to before. meh.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 11 2022 at 23:40):

fitzgen requested alexcrichton for a review on PR #3681.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2022 at 15:13):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2022 at 15:13):

alexcrichton merged PR #3681.


Last updated: Nov 22 2024 at 16:03 UTC