RFR: 8277324: C2 compilation fails with "bad AD file" on x86-32 after JDK-8276162 due to missing match rule [v2]

Christian Hagedorn chagedorn at openjdk.java.net
Wed Nov 17 12:57:34 UTC 2021


On Wed, 17 Nov 2021 12:37:13 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> src/hotspot/cpu/x86/x86_32.ad line 13160:
>> 
>>> 13158:   opcode(0x0F,0x40);
>>> 13159:   ins_encode( enc_cmov(cmp), RegReg( dst, src ) );
>>> 13160:   ins_pipe( pipe_cmov_reg );
>> 
>> Since this code is shared with `cmovII_reg_LTGE`, we could directly use it with `expand`:
>> 
>>   expand %{
>>     cmovII_reg_LTGE(cmp, flags, dst, src);
>>   %}
>> 
>> Could also be done for the other cases.
>
> Thanks Christian, that's a good suggestion. I thought expand does not work because the argument types differ but it does. I updated the patch.

Looks good! AFAICT the two operands `flagsReg_(u)long_LTGE` only differ in their format string which is probably why it works. But maybe someone else can jump in here who knows the code better.

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

PR: https://git.openjdk.java.net/jdk/pull/6427


More information about the hotspot-compiler-dev mailing list