RFR (XS): 8151988: Fix for bug - Hotspot deoptimizes div/mod pair usage

Deshpande, Vivek R vivek.r.deshpande at intel.com
Mon Aug 1 18:49:43 UTC 2016


Hi Vladimir

I have fixed the problem of null control edge getting generated for DivMod node in this later patch.
Could you please take a look at the webrev at this location:
http://cr.openjdk.java.net/~vdeshpande/8151988/webrev.01/

Regards,
Vivek

-----Original Message-----
From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com] 
Sent: Wednesday, July 27, 2016 7:54 PM
To: Deshpande, Vivek R; hotspot compiler
Cc: Viswanathan, Sandhya
Subject: Re: RFR (XS): 8151988: Fix for bug - Hotspot deoptimizes div/mod pair usage

If control edge is different (one of them not NULL) I don't think we can replace Div and Mod nodes.
Control edge enforce the order of execution of data nodes. DivModI node takes control from ModI node which can put DivModI below users of DivI node. So you will have shceduler problem.

So why control edge is NULL for DivI (or ModI) node? Control edge should come from zero_check_int() which is called for ModI and DivI nodes.

Thanks,
Vladimir

On 7/27/16 5:56 PM, dean.long at oracle.com wrote:
> How about this?  I think it gives the same result, but with fewer tests
>
>               if (use->in(j) != in(j) &&(j != 0 || (use->in(j) != NULL && in(j) != NULL)) {
>                 break;
>               }
>
>
> dl
>
> On 7/27/16 4:14 PM, Deshpande, Vivek R wrote:
>>
>> Hi
>>
>> I have resolved the bug and fix for the same is here.
>>
>> http://cr.openjdk.java.net/~vdeshpande/8151988/webrev.00/
>>
>> I have also updated the JBS entry.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8151988
>>
>> Would you please review it.
>>
>> Regards,
>>
>> Vivek
>>
>


More information about the hotspot-compiler-dev mailing list