-
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
Cranelift: mov
not removed when lowering select
#3744
Comments
As we discussed, this is |
The codegen cosmetics issue is tracked in bytecodealliance#3744
The current output is:
which I think means that this is fixed. Is this something we'll want a test for though before closing? |
Yeah, I guess we could add a CLIF compile test for this but I think that if we use the debug output it could be unwittingly overwritten in a |
Indeed, this was one of my concerns with the auto-blessing (though to be clear it's a big convenience improvement overall, so I don't think it was a mistake). I think the right answer is probably to use non-autoblessed tests for cases where we're asserting a certain property about the output, and possibly be a bit looser in the matching on details we don't care about (prologue/epilogue, specific registers), then reduce the number of precise-output tests overall (and make heavier use of run-tests). |
I can add a |
Go for it, happy to review, and thank you! |
In bytecodealliance#3744, we identified that extra `mov` instructions were inserted in between the `cmov` instructions that CLIF's `select` lowers to. The switch to regalloc2 resolved this and this test checks that no intervening `mov`s are inserted. Closes bytecodealliance#3744.
In bytecodealliance#3744, we identified that extra `mov` instructions were inserted in between the `cmov` instructions that CLIF's `select` lowers to. The switch to regalloc2 resolved this and this test checks that no intervening `mov`s are inserted. Closes bytecodealliance#3744.
.clif
Test CaseSteps to Reproduce
Expected Results
No extra
movl
instruction after theucomiss
comparison.Actual Results
There is no need for instruction 7,
movl %edi, %edi
, but for some reason it is not being elided.Versions and Environment
Cranelift version or commit: this redundant instruction is present in the ISLE changes to
select
currently under review at #3682.The text was updated successfully, but these errors were encountered: