Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
Change-Id: I892e532ea7b6d884cfbeaf9e55d5c9a26a27ab3a
  • Loading branch information
Eric Liu committed Oct 31, 2023
1 parent 656334e commit f499ce8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 23 deletions.
32 changes: 27 additions & 5 deletions test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,34 @@ public class IRNode {
trapNodes(RANGE_CHECK_TRAP,"range_check");
}

public static final String REPLICATE = PREFIX + "REPLICATE" + POSTFIX;
public static final String REPLICATE_B = VECTOR_PREFIX + "REPLICATE_B" + POSTFIX;
static {
String regex = START + "Replicate" + MID + END;
IR_NODE_MAPPINGS.put(REPLICATE, new SinglePhaseRangeEntry(CompilePhase.PRINT_IDEAL, regex,
CompilePhase.AFTER_CLOOPS,
CompilePhase.BEFORE_MATCHING));
vectorNode(REPLICATE_B, "Replicate", TYPE_BYTE);
}

public static final String REPLICATE_S = VECTOR_PREFIX + "REPLICATE_S" + POSTFIX;
static {
vectorNode(REPLICATE_S, "Replicate", TYPE_SHORT);
}

public static final String REPLICATE_I = VECTOR_PREFIX + "REPLICATE_I" + POSTFIX;
static {
vectorNode(REPLICATE_I, "Replicate", TYPE_INT);
}

public static final String REPLICATE_L = VECTOR_PREFIX + "REPLICATE_L" + POSTFIX;
static {
vectorNode(REPLICATE_L, "Replicate", TYPE_LONG);
}

public static final String REPLICATE_F = VECTOR_PREFIX + "REPLICATE_F" + POSTFIX;
static {
vectorNode(REPLICATE_F, "Replicate", TYPE_FLOAT);
}

public static final String REPLICATE_D = VECTOR_PREFIX + "REPLICATE_D" + POSTFIX;
static {
vectorNode(REPLICATE_D, "Replicate", TYPE_DOUBLE);
}

public static final String REVERSE_BYTES_VB = VECTOR_PREFIX + "REVERSE_BYTES_VB" + POSTFIX;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static void test2(int[] data) {
}

@Test
@IR(counts = {IRNode.LOAD_VECTOR_I, "> 0", IRNode.REPLICATE, "> 0", IRNode.ADD_VI, "> 0", IRNode.MUL_VI, "> 0", IRNode.STORE_VECTOR, "> 0"},
@IR(counts = {IRNode.LOAD_VECTOR_I, "> 0", IRNode.REPLICATE_I, "> 0", IRNode.ADD_VI, "> 0", IRNode.MUL_VI, "> 0", IRNode.STORE_VECTOR, "> 0"},
applyIf = {"AlignVector", "false"},
applyIfCPUFeatureOr = {"sse4.1", "true", "asimd", "true"})
static void test3(int[] data, int A, int B) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public ArrayInvariantFillTest() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_B, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_B, "0"})
public byte[] fillByteArray() {
byte[] res = new byte[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -87,10 +87,10 @@ public byte[] fillByteArray() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_S, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_S, "0"})
public short[] fillShortArray() {
short[] res = new short[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -102,10 +102,10 @@ public short[] fillShortArray() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_S, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_S, "0"})
public char[] fillCharArray() {
char[] res = new char[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -117,10 +117,10 @@ public char[] fillCharArray() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_I, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_I, "0"})
public int[] fillIntArray() {
int[] res = new int[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -131,7 +131,7 @@ public int[] fillIntArray() {

@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_L, ">0"})
public long[] fillLongArray() {
long[] res = new long[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -143,10 +143,10 @@ public long[] fillLongArray() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_F, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_F, "0"})
public float[] fillFloatArray() {
float[] res = new float[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -157,7 +157,7 @@ public float[] fillFloatArray() {

@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_D, ">0"})
public double[] fillDoubleArray() {
double[] res = new double[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -169,7 +169,7 @@ public double[] fillDoubleArray() {
// ---------------- Fill With Type Change ----------------
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_L, ">0"})
public long[] fillLongArrayWithInt() {
long[] res = new long[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -180,7 +180,7 @@ public long[] fillLongArrayWithInt() {

@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_L, ">0"})
public long[] fillLongArrayWithUnsigned() {
long[] res = new long[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -191,7 +191,7 @@ public long[] fillLongArrayWithUnsigned() {

@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_L, ">0"})
public long[] fillLongArrayWithFloat() {
long[] res = new long[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand All @@ -203,10 +203,10 @@ public long[] fillLongArrayWithFloat() {
@Test
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "false"},
counts = {IRNode.REPLICATE, ">0"})
counts = {IRNode.REPLICATE_I, ">0"})
@IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
applyIf = {"OptimizeFill", "true"},
counts = {IRNode.REPLICATE, "0"})
counts = {IRNode.REPLICATE_I, "0"})
public int[] fillIntArrayWithDouble() {
int[] res = new int[SIZE];
for (int i = 0; i < SIZE; i++) {
Expand Down

0 comments on commit f499ce8

Please sign in to comment.