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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
fitzgen requested alexcrichton for a review on PR #3681.
fitzgen updated PR #3681 from port-sshr-to-isle
to main
.
alexcrichton submitted PR review.
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)
alexcrichton submitted PR review.
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?
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?)
fitzgen submitted PR review.
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-
fitzgen updated PR #3681 from port-sshr-to-isle
to main
.
fitzgen requested alexcrichton for a review on PR #3681.
fitzgen updated PR #3681 from port-sshr-to-isle
to main
.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Oh sorry I meant to ask earlier, but what's this doing?
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 extramovdqa
after thepsraw
. Would reordering the instructions in isle help at all?I dunno how to keep track of "well regalloc2 will probably fix that" style things.
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?
fitzgen submitted PR review.
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.
fitzgen submitted PR review.
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.
fitzgen updated PR #3681 from port-sshr-to-isle
to main
.
fitzgen updated PR #3681 from port-sshr-to-isle
to main
.
fitzgen submitted PR review.
fitzgen created PR review comment:
Managed to get it down to 12 instructions, instead of 13. Still one additional move compared to before. meh.
fitzgen requested alexcrichton for a review on PR #3681.
alexcrichton submitted PR review.
alexcrichton merged PR #3681.
Last updated: Dec 23 2024 at 12:05 UTC