elliottt opened PR #4599 from trevor/x64-isle-br-i128 to main:
- Migrate the implementation of brz and brnz for I128
- Remove unused 8-bit ALU instructions
- Finish migrating branch instructions for floats
<!--
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.
-->
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt edited PR #4599 from trevor/x64-isle-br-i128 to main:
I changed the lowering of comparisons for
I128to always end withtestinstead ofandorordepending on whether the context was abrzorbrnzinstruction. An effect of this change was that the 8-bit variants of theAndandOralu opcodes were no longer needed. The change that this introduces is visible in thei128.cliftest output update.I've also finished the migration of instructions that require floating point comparisons, and removed all the unused code that stemmed from the rust implementation of
emit_cmp. This change required adding new constructors to bothSideEffectNoResultsandConsumesFlags, as theAndConditionandOrConditionconstructors ofFcmpCompResultboth lower to two jump instructions. This could be re-implemented as two new pseudo-instructions,JmpCondAndandJmpCondOr, if it seems like this isn't the right approach.<!--
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.
-->
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt edited PR #4599 from trevor/x64-isle-br-i128 to main:
I changed the lowering of comparisons for
I128to always end withtestinstead ofandorordepending on whether the context was abrzorbrnzinstruction. An effect of this change was that the 8-bit variants of theAndandOralu opcodes were no longer needed. The change that this introduces is visible in thei128.cliftest output update.I've also finished the migration of instructions that require floating point comparisons, and removed all the unused code that stemmed from the rust implementation of
emit_fcmp. This change required adding new constructors to bothSideEffectNoResultsandConsumesFlags, as theAndConditionandOrConditionconstructors ofFcmpCompResultboth lower to two jump instructions. This could be re-implemented as two new pseudo-instructions,JmpCondAndandJmpCondOr, if it seems like this isn't the right approach.<!--
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.
-->
elliottt has marked PR #4599 as ready for review.
elliottt requested cfallin for a review on PR #4599.
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt edited PR #4599 from trevor/x64-isle-br-i128 to main:
I changed the lowering of comparisons for
I128to always end withtestinstead ofandorordepending on whether the context was abrzorbrnzinstruction. An effect of this change was that the 8-bit variants of theAndandOralu opcodes were no longer needed. The change that this introduces is visible in thei128.cliftest output update.I've also finished the migration of instructions that require floating point comparisons, and removed all the unused code that stemmed from the rust implementation of
emit_fcmp. This change required adding new constructors to bothSideEffectNoResultsandConsumesFlags, as theAndConditionandOrConditionconstructors ofFcmpCompResultboth lower to two jump instructions. This could be re-implemented as two new pseudo-instructions,JmpCondAndandJmpCondOr, if it seems like this isn't the right approach.The test cases added in
filetests/isa/x64/branches.clifwere generated on the main branch, which helped with debugging thebrz (fcmp ...)lowering.<!--
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.
-->
elliottt has marked PR #4599 as ready for review.
cfallin created PR review comment:
Can this go away completely now (i.e. constant-prop the
falseoutward to wherever it's called, if anywhere)?
cfallin submitted PR review.
cfallin submitted PR review.
elliottt submitted PR review.
elliottt created PR review comment:
Definitely! I was a little unsure if removing
Add8andOr8was desirable, so I didn't push the refactoring as far as I could have :)
cfallin created PR review comment:
We likely won't need them for anything else I think -- the actual 8-bit ops use wider opcodes because it's more efficient microarchitecturally (no partial-register stalls) and the upper bits are don't-cares; at least
or8was only needed here because we used SETcc which only sets the lower 8. We can always add them back if we find they're needed!
cfallin submitted PR review.
elliottt updated PR #4599 from trevor/x64-isle-br-i128 to main.
elliottt merged PR #4599.
Last updated: Dec 06 2025 at 06:05 UTC