8253721: Flag -XX:AVX3Threshold does not accept Zero value
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
4d9f207347
commit
ac02afe9dc
@ -213,6 +213,7 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
|
||||
"for copy, inflate and fill. When this value is set as zero" \
|
||||
"compare operations can also use AVX512 intrinsics.") \
|
||||
range(0, max_jint) \
|
||||
constraint(AVX3ThresholdConstraintFunc,AfterErgo) \
|
||||
\
|
||||
product(bool, IntelJccErratumMitigation, true, DIAGNOSTIC, \
|
||||
"Turn off JVM mitigations related to Intel micro code " \
|
||||
|
@ -1162,13 +1162,6 @@ void VM_Version::get_processor_features() {
|
||||
}
|
||||
#endif // COMPILER2 && ASSERT
|
||||
|
||||
if (!FLAG_IS_DEFAULT(AVX3Threshold)) {
|
||||
if (!is_power_of_2(AVX3Threshold)) {
|
||||
warning("AVX3Threshold must be a power of 2");
|
||||
FLAG_SET_DEFAULT(AVX3Threshold, 4096);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LP64
|
||||
if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) {
|
||||
UseMultiplyToLenIntrinsic = true;
|
||||
|
@ -285,6 +285,17 @@ JVMFlag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verb
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
|
||||
JVMFlag::Error AVX3ThresholdConstraintFunc(int value, bool verbose) {
|
||||
if (value != 0 && !is_power_of_2(value)) {
|
||||
JVMFlag::printError(verbose,
|
||||
"AVX3Threshold ( %d ) must be 0 or "
|
||||
"a power of two value between 0 and MAX_INT\n", value);
|
||||
return JVMFlag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
|
||||
JVMFlag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) {
|
||||
if (value >= 4032) {
|
||||
JVMFlag::printError(verbose,
|
||||
|
@ -47,6 +47,7 @@
|
||||
f(intx, OptoLoopAlignmentConstraintFunc) \
|
||||
f(uintx, ArraycopyDstPrefetchDistanceConstraintFunc) \
|
||||
f(uintx, ArraycopySrcPrefetchDistanceConstraintFunc) \
|
||||
f(int, AVX3ThresholdConstraintFunc) \
|
||||
f(uintx, TypeProfileLevelConstraintFunc) \
|
||||
f(intx, InitArrayShortSizeConstraintFunc) \
|
||||
f(int , RTMTotalCountIncrRateConstraintFunc) \
|
||||
|
@ -84,7 +84,6 @@ public final class AMD64ArrayCompareToOp extends AMD64LIRInstruction {
|
||||
public AMD64ArrayCompareToOp(LIRGeneratorTool tool, int useAVX3Threshold, JavaKind kind1, JavaKind kind2, Value result, Value array1, Value array2, Value length1, Value length2) {
|
||||
super(TYPE);
|
||||
|
||||
assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2";
|
||||
this.useAVX3Threshold = useAVX3Threshold;
|
||||
this.kind1 = kind1;
|
||||
this.kind2 = kind2;
|
||||
|
@ -71,7 +71,6 @@ public final class AMD64StringLatin1InflateOp extends AMD64LIRInstruction {
|
||||
public AMD64StringLatin1InflateOp(LIRGeneratorTool tool, int useAVX3Threshold, Value src, Value dst, Value len) {
|
||||
super(TYPE);
|
||||
|
||||
assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2";
|
||||
this.useAVX3Threshold = useAVX3Threshold;
|
||||
|
||||
assert asRegister(src).equals(rsi);
|
||||
|
@ -76,7 +76,6 @@ public final class AMD64StringUTF16CompressOp extends AMD64LIRInstruction {
|
||||
public AMD64StringUTF16CompressOp(LIRGeneratorTool tool, int useAVX3Threshold, Value res, Value src, Value dst, Value len) {
|
||||
super(TYPE);
|
||||
|
||||
assert CodeUtil.isPowerOf2(useAVX3Threshold) : "AVX3Threshold must be power of 2";
|
||||
this.useAVX3Threshold = useAVX3Threshold;
|
||||
|
||||
assert asRegister(src).equals(rsi);
|
||||
|
Loading…
Reference in New Issue
Block a user