RFR: 8297753: AArch64: Add optimized rules for vector compare with zero on NEON [v6]
Andrew Haley
aph at openjdk.org
Mon Feb 27 15:22:09 UTC 2023
On Mon, 27 Feb 2023 08:56:35 GMT, Chang Peng <duke at openjdk.org> wrote:
>> I see. That sounds like a bug, but OK.
>
> Following is the code of ccode() of cmpOpUOper:
>
>
> virtual int ccode() const {
> switch (_c0) {
> case BoolTest::eq : return equal();
> case BoolTest::gt : return greater();
> case BoolTest::lt : return less();
> case BoolTest::ne : return not_equal();
> case BoolTest::le : return less_equal();
> case BoolTest::ge : return greater_equal();
> case BoolTest::overflow : return overflow();
> case BoolTest::no_overflow: return no_overflow();
> default : ShouldNotReachHere(); return 0;
> }
> };
>
>
> I have another patch working on enabling SVE vector unsigned comparison, if we use ```assert(cmpOpUOper(unsigned_cond).ccode() == result, "Invalid conversion");```, the code will enter
> ```ShouldNotReachHere()```.
I see, but all you have to do then is something like
if (cond & BoolTest::unsigned_compare)
assert( cmpOpUOper(cond & something).ccode() == result)
else
assert( cmpOpOper(cond).ccode() == result)
surely?
-------------
PR: https://git.openjdk.org/jdk/pull/11822
More information about the hotspot-compiler-dev
mailing list