FreddieLiardet opened PR #3887 from vec_comp to main:
Signed-off-by: Freddie Liardet <frederick.liardet@arm.com>
Optimization for simd comparisons to 0 vectors using dedicated instructions.
<!--
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.
-->
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
It's a tiny stylistic nit but I'd prefer to avoid this paren on its own line style; the more common S-expr formatting is something like
(let ((x ...) (y ...) (z ...)) body)
cfallin created PR review comment:
The
def_instcan be skipped now that we have implicit conversions -- should make this pattern look much nicer!
cfallin created PR review comment:
Could you add spaces between the term name and arg list parenthesis here?
cfallin created PR review comment:
put_in_regalso has an implicit conversion defined now, so we can do:(rn Reg x)or just use
rnin a context that expects aRegand things should Just Work.
cfallin created PR review comment:
Tiny nit but we've mostly stuck to all-lowercase with underscores ("snake case"); would prefer
noteqornot_eqhere.
cfallin created PR review comment:
It looks like this isn't changing the matched
IntCC; could we write this as justIntCC::Equal | IntCC::SignedGreaterThanOrEqual | ... => Some(cond)?
cfallin created PR review comment:
Could you add some comments here describing what the extractors look for? E.g. from
icmp_cond_zeroit's not entirely clear to me what this means: a "zero condition"? Does it change theIntCCsomehow?
cfallin created PR review comment:
a more descriptive name might be good for this helper:
float_cc_cmp_zero_to_vec_misc_opmaybe?fcomparedoesn't tell the reader what it does, other than suggest perhaps it returns an instruction or something to do a compare... also, the name does not at all suggest the connection to zero.
FreddieLiardet updated PR #3887 from vec_comp to main.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Sorry, I should've said "and similar below" to earlier comments about naming the above constructors. Could you make all of these added ones more descriptive as well? E.g.
f_comp_instdoesn't give me any hint that this might have to do with zero comparisons; at best I might buess that it means "create a floating point comparison instruction", which sounds like a generic constructor.Doc comments on each (one line is fine) to say what they do would also be helpful. Thanks!
cfallin created PR review comment:
More paren-style comments: here and below, the closing parens should be on the last line of the body, not on separate lines.
FreddieLiardet updated PR #3887 from vec_comp to main.
cfallin submitted PR review.
cfallin merged PR #3887.
Last updated: Dec 06 2025 at 06:05 UTC