< prev index next >

test/compiler/loopopts/superword/TestVectorizationWithInvariant.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 8078497
  28  * @summary Tests correct alignment of vectors with loop invariant offset.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /testlibrary
  31  * @run main compiler.loopopts.superword.TestVectorizationWithInvariant
  32  */
  33 
  34 package compiler.loopopts.superword;
  35 
  36 import jdk.internal.misc.Unsafe;
  37 import jdk.test.lib.Utils;
  38 
  39 public class TestVectorizationWithInvariant {
  40 
  41     private static Unsafe unsafe;
  42     private static final long BYTE_ARRAY_OFFSET;
  43     private static final long CHAR_ARRAY_OFFSET;
  44 
  45     static {
  46         unsafe = Utils.getUnsafe();
  47         BYTE_ARRAY_OFFSET = unsafe.arrayBaseOffset(byte[].class);
  48         CHAR_ARRAY_OFFSET = unsafe.arrayBaseOffset(char[].class);
  49     }
  50 




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test
  27  * @bug 8078497
  28  * @summary Tests correct alignment of vectors with loop invariant offset.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /test/lib
  31  * @run main compiler.loopopts.superword.TestVectorizationWithInvariant
  32  */
  33 
  34 package compiler.loopopts.superword;
  35 
  36 import jdk.internal.misc.Unsafe;
  37 import jdk.test.lib.Utils;
  38 
  39 public class TestVectorizationWithInvariant {
  40 
  41     private static Unsafe unsafe;
  42     private static final long BYTE_ARRAY_OFFSET;
  43     private static final long CHAR_ARRAY_OFFSET;
  44 
  45     static {
  46         unsafe = Utils.getUnsafe();
  47         BYTE_ARRAY_OFFSET = unsafe.arrayBaseOffset(byte[].class);
  48         CHAR_ARRAY_OFFSET = unsafe.arrayBaseOffset(char[].class);
  49     }
  50 


< prev index next >