RFR: 8297753: AArch64: Add optimized rules for vector compare with zero on NEON [v6]

Andrew Haley aph at openjdk.org
Mon Feb 27 08:47:07 UTC 2023


On Mon, 27 Feb 2023 06:13:30 GMT, Chang Peng <duke at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/aarch64.ad line 2538:
>> 
>>> 2536: Assembler::Condition booltest_cond_to_assembler_cond(BoolTest::mask cond) {
>>> 2537:   switch(cond) {
>>> 2538:     case BoolTest::eq:
>> 
>> I'd `assert(cmpOpOper(cond).ccode() == result)` here.
>
> Thanks, I think this assert will guarantee the correctness of this function.
> 
> I found that cmpOpUOper convert signed BoolTest conditions (gt, ge, lt, le) to unsigned Assembler conditions, but unsigned vector comparison in vector API will produce unsigned BoolTest conditions(uge, ugt, ult, ule), and these conditons cannot be passed like following:
> 
> 
> assert(cmpOpUOper(unsigned_cond).ccode() == result, "Invalid conversion");
> ``` 
> Maybe we will meet some issues when taking unsigned vector comparison.

I see. That sounds like a bug, but OK.

-------------

PR: https://git.openjdk.org/jdk/pull/11822


More information about the hotspot-compiler-dev mailing list