This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
8260339: JVM crashes when executing PhaseIdealLoop::match_fill_loop
Co-authored-by: He Xuejin <hexuejin2@huawei.com> Reviewed-by: neliasso, kvn, iignatyev
- Loading branch information
2 people
authored and
Nils Eliasson
committed
Jan 29, 2021
1 parent
8ffdbce
commit a117e11
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
test/hotspot/jtreg/compiler/vectorapi/TestLoopStoreVector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright (c) 2021, Huawei Technologies Co. Ltd. All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 only, as | ||
* published by the Free Software Foundation. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
* or visit www.oracle.com if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
package compiler.vectorapi; | ||
|
||
import jdk.incubator.vector.IntVector; | ||
import jdk.incubator.vector.LongVector; | ||
import jdk.incubator.vector.VectorSpecies; | ||
|
||
/* | ||
* @test | ||
* @bug 8260339 | ||
* @summary StoreVectorNode is not considered with -XX:+OptimizeFill | ||
* @modules jdk.incubator.vector | ||
* | ||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+OptimizeFill compiler.vectorapi.TestLoopStoreVector | ||
*/ | ||
|
||
public class TestLoopStoreVector { | ||
static final VectorSpecies<Integer> SPECIESi = IntVector.SPECIES_PREFERRED; | ||
static final VectorSpecies<Long> SPECIESl = LongVector.SPECIES_PREFERRED; | ||
|
||
static final int INVOC_COUNT = 5000; | ||
static final int size = 64; | ||
|
||
static int[] ai = {20, 21, 02, 14, 83, 119, 101, 101, 116, 121, 44, 32, | ||
73, 32, 76, 79, 86, 69, 32, 89, 79, 85, 32, 102, 111, | ||
114, 101, 118, 101, 114, 33, 32, 32, 32, 45, 45, 32, | ||
32, 32, 66, 121, 32, 87, 97, 110, 103, 72, 117, 97, | ||
110, 103,46, 76, 105, 102, 101, 32, 105, 115, 32, 116, | ||
104, 101, 32}; | ||
static long[] al = {102, 108, 111, 119, 101, 114, 32, 102, 111, 114, 32, | ||
119, 104, 105, 99, 104, 32, 108, 111, 118, 101, 32, | ||
105, 115, 32, 116, 104, 101, 32, 104, 111, 110, 101, | ||
121, 46, 32, 87, 101, 32, 119, 105, 108, 108, 32, 115, | ||
116, 105, 99, 107, 32, 116, 111, 103, 101, 116, 104, | ||
101, 114, 32, 33, 33, 33, 33, 32}; | ||
|
||
public static void testVectorCastL2I(long[] input, int[] output, VectorSpecies<Long> speciesl, VectorSpecies<Integer> speciesi) { | ||
LongVector av = LongVector.fromArray(speciesl, input, 0); | ||
IntVector bv = (IntVector) av.castShape(speciesi, 0); | ||
bv.intoArray(output, 0); | ||
} | ||
|
||
public static int test0() { | ||
for (int i = 0; i < 1000; i++) { | ||
testVectorCastL2I(al, ai, SPECIESl, SPECIESi); | ||
} | ||
return 0; | ||
} | ||
|
||
public static void main(String[] args) { | ||
for (int i = 0; i < INVOC_COUNT; i++) { | ||
test0(); | ||
} | ||
for (int i = 0; i < 64; i++) { | ||
System.out.print(ai[i] + " "); | ||
} | ||
System.out.println(""); | ||
} | ||
} |
a117e11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
Issues