[jdk17] RFR: 8269775: compiler/codegen/ClearArrayTest.java failed with "assert(false) failed: bad AD file"
Vladimir Kozlov
kvn at openjdk.java.net
Fri Jul 2 01:05:57 UTC 2021
On Fri, 2 Jul 2021 00:38:30 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
> The following test failed in JDK17
> compiler/codegen/ClearArrayTest.java
> with assert(false) failed: bad AD file
>
> The problem is that no match is found for platforms not supporting avx512vlbw for constant input.
>
> Per analysis from Dean Long and Vladimir Kozlov:
> This is due to rep_stos rules for small clear array which use !n->in(2)->bottom_type()->is_long()->is_con().
> This prevents the rule from matching with a constant --> register conversion.
> Removing !is_con() from rep_stos for small clear array fixes the issue.
> We also add appropriate "ins_cost" to all ClearArray rules, so that in the case of multiple matches, we break the tie based on ins_cost.
>
> Best Regards,
> Sandhya
You need to fix `x86_32.ad` file too.
src/hotspot/cpu/x86/x86_64.ad line 11029:
> 11027: match(Set dummy (ClearArray cnt base));
> 11028: effect(USE_KILL cnt, USE_KILL base, TEMP tmp, KILL zero, KILL cr);
> 11029: ins_cost(125);
I don't think you need it here. There are no other ClearArray conflicting instructions for small copy and AVX <= 2.
src/hotspot/cpu/x86/x86_64.ad line 11087:
> 11085: Universe dummy, rFlagsReg cr)
> 11086: %{
> 11087: predicate(!((ClearArrayNode*)n)->is_large() && UseAVX > 2);
Add `()` around `UseAVX > 2` as in other place.
-------------
Changes requested by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk17/pull/199
More information about the hotspot-compiler-dev
mailing list