Request for reviews (S): 7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Jun 19 11:21:34 PDT 2012


 > So the vectorization didn't work on x86?

It works, only memory loads are separate instructions and it needs additional 
instruction to move from general register to XMM registers. The fixed 
instructions load directly into XMM registers.

Thanks,
Vladimir

Christian Thalinger wrote:
> On Jun 18, 2012, at 9:14 PM, Vladimir Kozlov wrote:
> 
>> http://cr.openjdk.java.net/~kvn/7177923/webrev
>>
>> 7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()
>>
>> The code in clear() initialize 3 arrays in a loop. Two arrays are int[] and one is boolean[]. After 7119644 changes all 3 are vectorized. Pre-loop iterations are adjusted to align access for int[] arrays since there are more memory accesses to them. A vector on sparc contains 2 integer values so 2 iterations are executed in pre-loop which is not enough to align boolean[] array (which has 8 elements in vector). As result vector store into boolean[] throw SIGBUS in main loop.
>>
>> The solution is disable vectorization of a memory access with more elements per vector than one which is used for alignment if unaligned memory access is not allowed.
> 
> Looks good.
> 
>> Also fixed incorrect matching rules in x86.ad and re-factored method vector_width_in_bytes().
> 
> So the vectorization didn't work on x86?
> 
> -- Chris
> 
>> Tested with failing tests on sparc.
>>
>> Thanks,
>> Vladimir
> 


More information about the hotspot-compiler-dev mailing list