RFR: 8297753: AArch64: Add optimized rules for vector compare with zero on NEON [v4]
Andrew Haley
aph at openjdk.org
Fri Feb 10 11:02:47 UTC 2023
On Fri, 10 Feb 2023 04:20:32 GMT, Chang Peng <duke at openjdk.org> wrote:
>> Thanks for pointing this usage, I didn't know that before. I found that cmpOpOper is generated by cmpOp operand defined in aarch64.ad, and it is able to convert input BoolTest condition and Assembler condition. However, the vector compare operand in VectorMaskCmp is ConINode, while cmpOp operand can only match BoolNode. How about adding a new standalone function like x86 https://github.com/openjdk/jdk/blob/e245620f6f6a836aef8ddef9f699cc540f2a5eb6/src/hotspot/cpu/x86/x86.ad#L2498 to convert from BoolTest to Assembler::Condition?
>
> Maybe we can use cmpOpOper by following way in aarch64_vector.ad:
>
>
> Assembler::Condition condition = (Assembler::Condition)(cmpOpOper((BoolTest::mask) (int)($cond$$constant)).ccode());
>
>
> but I think this code style is a little ugly and cmpOpOper should be used as a operand but not a utility.
It's not helpful to replicate the logic in `cmpOpOper::ccode`. Neither is it at all helpful that the `BoolTest::mask` is passed as an int. I guess it'd be OK to create a function, and add a comment that it replicates the logic in `cmpOpOper::ccode`.
-------------
PR: https://git.openjdk.org/jdk/pull/11822
More information about the hotspot-compiler-dev
mailing list