Mercurial > hg > graal-compiler
diff src/share/vm/opto/superword.hpp @ 6183:6f8f439e247d
7177923: SIGBUS on sparc in compiled code for java.util.Calendar.clear()
Summary: disable vectorization of a memory access with more elements per vector than one which is used for alignment on sparc
Reviewed-by: twisti
author | kvn |
---|---|
date | Tue, 19 Jun 2012 15:12:56 -0700 |
parents | 8c92982cbbc4 |
children | 8ae8f9dd7099 |
line wrap: on
line diff
--- a/src/share/vm/opto/superword.hpp Mon Jun 18 15:17:30 2012 -0700 +++ b/src/share/vm/opto/superword.hpp Tue Jun 19 15:12:56 2012 -0700 @@ -264,11 +264,14 @@ _iv = lp->as_CountedLoop()->phi()->as_Phi(); } int iv_stride() { return lp()->as_CountedLoop()->stride_con(); } - int vector_width_in_bytes(BasicType bt) { - return MIN2(ABS(iv_stride())*type2aelembytes(bt), - Matcher::vector_width_in_bytes(bt)); + int vector_width(Node* n) { + BasicType bt = velt_basic_type(n); + return MIN2(ABS(iv_stride()), Matcher::max_vector_size(bt)); } - + int vector_width_in_bytes(Node* n) { + BasicType bt = velt_basic_type(n); + return vector_width(n)*type2aelembytes(bt); + } MemNode* align_to_ref() { return _align_to_ref; } void set_align_to_ref(MemNode* m) { _align_to_ref = m; }