8314513: [IR Framework] Some internal IR Framework tests are failing after JDK-8310308 on PPC and Cascade Lake

Reviewed-by: kvn, mdoerr
This commit is contained in:
Christian Hagedorn 2023-08-28 10:30:48 +00:00
parent cf2d33ca2e
commit 5c4f1dc43e
2 changed files with 18 additions and 25 deletions

View File

@ -25,12 +25,12 @@ package compiler.lib.ir_framework.driver.irmatching.irrule.constraint.raw;
import compiler.lib.ir_framework.CompilePhase;
import compiler.lib.ir_framework.IR;
import compiler.lib.ir_framework.IRNode;
import compiler.lib.ir_framework.TestFramework;
import compiler.lib.ir_framework.shared.Comparison;
import compiler.lib.ir_framework.driver.SuccessOnlyConstraintException;
import compiler.lib.ir_framework.driver.irmatching.irrule.checkattribute.parsing.RawIRNode;
import compiler.lib.ir_framework.driver.irmatching.irrule.constraint.Constraint;
import compiler.lib.ir_framework.driver.irmatching.parser.VMInfo;
import compiler.lib.ir_framework.shared.Comparison;
/**
* This class represents a raw constraint of a {@link IR#failOn()} attribute.
@ -54,7 +54,11 @@ public class RawFailOnConstraint implements RawConstraint {
@Override
public Constraint parse(CompilePhase compilePhase, String compilationOutput, VMInfo vmInfo) {
TestFramework.check(compilePhase != CompilePhase.DEFAULT, "must not be default");
return Constraint.createFailOn(rawIRNode.regex(compilePhase, vmInfo, Comparison.Bound.UPPER), constraintIndex, compilationOutput);
try {
return Constraint.createFailOn(rawIRNode.regex(compilePhase, vmInfo, Comparison.Bound.UPPER), constraintIndex, compilationOutput);
} catch (SuccessOnlyConstraintException e) {
return Constraint.createSuccess();
}
}
}

View File

@ -1055,28 +1055,17 @@ class BadIRAnnotationsAfterTestVM {
@Test
@FailCount(8)
@IR(counts = {IRNode.LOAD_VECTOR_I, "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_MAX, "> 0"}, // valid
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_ANY, "> 0"}, // valid
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "xxx", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min()", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type)", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "2,4,8,16,32,64,max_int", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "2,4,8,16,32,64,-3", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type, xxx)", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type, min(max_for_type, max_for_type))", "> 0"},
applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"})
@IR(counts = {IRNode.LOAD_VECTOR_I, "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_MAX, "> 0"}) // valid
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_ANY, "> 0"}) // valid
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "xxx", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min()", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type)", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "2,4,8,16,32,64,max_int", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "2,4,8,16,32,64,-3", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type, xxx)", "> 0"})
@IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_for_type, min(max_for_type, max_for_type))", "> 0"})
public int[] badVectorNodeSize() {
int[] a = new int[1024*8];
for (int i = 0; i < a.length; i++) {