[15] RFR (S): 8242492: C2: Remove Matcher::vector_shift_count_ideal_reg()

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Apr 16 10:09:56 UTC 2020


Thanks for the review, Vladimir.

Best regards,
Vladimir Ivanov

On 16.04.2020 02:33, Vladimir Kozlov wrote:
> Good.
> 
> Thanks,
> Vladimir K
> 
> On 4/10/20 7:25 AM, Vladimir Ivanov wrote:
>> http://cr.openjdk.java.net/~vlivanov/8242492/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8242492
>>
>> Matcher::vector_shift_count_ideal_reg() was introduced specifically 
>> for x86 to communicate that only low 32 bits are used by vector shift 
>> instructions, so only those bits should be spilled when needed.
>>
>> Unfortunately, it is broken for LShiftCntV/RShiftCntV: Matcher doesn't 
>> capute overridden ideal_reg value and spills use bottom type instead. 
>> So, it causes a mismatch during RA.
>>
>> Fortunately, LShiftCntV/RShiftCntV are never spilled on x86. 
>> Considering how simple AD instructions for LShiftCntV/RShiftCntV are, 
>> RA prefers to rematerialize the value instead (which is a reg-to-reg 
>> move).
>>
>> I propose to simplify the implementation and completely remove 
>> Matcher::vector_shift_count_ideal_reg() along with additional special 
>> handling logic for LShiftCntV/RShiftCntV.
>>
>> Testing: hs-precheckin-comp, hs-tier1, hs-tier2
>>
>> Thanks!
>>
>> Best regards,
>> Vladimir Ivanov


More information about the hotspot-compiler-dev mailing list