mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 18:08:31 +00:00
8183103: Post loop vectorization produces incorrect results
Disable AVX=3 and PostLoopMultiversioning by default and make them experimental in JDK 9. Reviewed-by: kvn
This commit is contained in:
parent
7a7f534d7b
commit
ef3a681e7b
@ -55,7 +55,6 @@ define_pd_global(intx, InteriorEntryAlignment, 16);
|
||||
define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
|
||||
define_pd_global(intx, LoopUnrollLimit, 60);
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
define_pd_global(intx, PostLoopMultiversioning, false);
|
||||
// InitialCodeCacheSize derived from specjbb2000 run.
|
||||
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
|
||||
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
|
||||
|
||||
@ -70,7 +70,6 @@ define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
define_pd_global(intx, PostLoopMultiversioning, false);
|
||||
define_pd_global(intx, MinJumpTableSize, 16);
|
||||
|
||||
// Peephole and CISC spilling both break the graph, and so makes the
|
||||
|
||||
@ -55,7 +55,6 @@ define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
define_pd_global(intx, LoopUnrollLimit, 60);
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
define_pd_global(intx, PostLoopMultiversioning, false);
|
||||
|
||||
// Peephole and CISC spilling both break the graph, and so make the
|
||||
// scheduler sick.
|
||||
|
||||
@ -56,7 +56,6 @@ define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
define_pd_global(intx, LoopUnrollLimit, 60);
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
define_pd_global(intx, PostLoopMultiversioning, false);
|
||||
define_pd_global(intx, MinJumpTableSize, 18);
|
||||
|
||||
// Peephole and CISC spilling both break the graph, and so makes the
|
||||
|
||||
@ -53,7 +53,6 @@ define_pd_global(bool, UseTLAB, true);
|
||||
define_pd_global(bool, ResizeTLAB, true);
|
||||
define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 10);
|
||||
define_pd_global(intx, PostLoopMultiversioning, false);
|
||||
define_pd_global(intx, MinJumpTableSize, 5);
|
||||
|
||||
// Peephole and CISC spilling both break the graph, and so makes the
|
||||
|
||||
@ -47,7 +47,6 @@ define_pd_global(intx, ConditionalMoveLimit, 3);
|
||||
define_pd_global(intx, FreqInlineSize, 325);
|
||||
define_pd_global(intx, MinJumpTableSize, 10);
|
||||
define_pd_global(intx, LoopPercentProfileLimit, 30);
|
||||
define_pd_global(intx, PostLoopMultiversioning, true);
|
||||
#ifdef AMD64
|
||||
define_pd_global(intx, INTPRESSURE, 13);
|
||||
define_pd_global(intx, FLOATPRESSURE, 14);
|
||||
|
||||
@ -116,9 +116,10 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
|
||||
product(bool, UseStoreImmI16, true, \
|
||||
"Use store immediate 16-bits value instruction on x86") \
|
||||
\
|
||||
product(intx, UseAVX, 99, \
|
||||
product(intx, UseAVX, 2, \
|
||||
"Highest supported AVX instructions set on x86/x64") \
|
||||
range(0, 99) \
|
||||
constraint(UseAVXConstraintFunc, AtParse) \
|
||||
\
|
||||
product(bool, UseCLMUL, false, \
|
||||
"Control whether CLMUL instructions can be used on x86/x64") \
|
||||
|
||||
@ -181,7 +181,7 @@
|
||||
"Map number of unrolls for main loop via " \
|
||||
"Superword Level Parallelism analysis") \
|
||||
\
|
||||
diagnostic_pd(bool, PostLoopMultiversioning, \
|
||||
experimental(bool, PostLoopMultiversioning, false, \
|
||||
"Multi versioned post loops to eliminate range checks") \
|
||||
\
|
||||
notproduct(bool, TraceSuperWordLoopUnrollAnalysis, false, \
|
||||
|
||||
@ -332,6 +332,17 @@ Flag::Error InitArrayShortSizeConstraintFunc(intx value, bool verbose) {
|
||||
}
|
||||
}
|
||||
|
||||
Flag::Error UseAVXConstraintFunc(intx value, bool verbose) {
|
||||
if (value > 2 && !UnlockExperimentalVMOptions) {
|
||||
CommandLineError::print(verbose,
|
||||
"UseAVX (" UINTX_FORMAT ") is experimental and must be "
|
||||
"enabled via -XX:+UnlockExperimentalVMOptions \n", value);
|
||||
return Flag::VIOLATES_CONSTRAINT;
|
||||
} else {
|
||||
return Flag::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
Flag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose) {
|
||||
if (InteriorEntryAlignment > CodeEntryAlignment) {
|
||||
|
||||
@ -64,6 +64,8 @@ Flag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose);
|
||||
|
||||
Flag::Error InitArrayShortSizeConstraintFunc(intx value, bool verbose);
|
||||
|
||||
Flag::Error UseAVXConstraintFunc(intx value, bool verbose);
|
||||
|
||||
#ifdef COMPILER2
|
||||
Flag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
* @bug 8154763
|
||||
* @summary Tests PostLoopMultiversioning with RangeCheckElimination disabled.
|
||||
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions
|
||||
* -XX:+PostLoopMultiversioning -XX:-RangeCheckElimination
|
||||
* -XX:+UnlockExperimentalVMOptions -XX:+PostLoopMultiversioning -XX:-RangeCheckElimination
|
||||
* compiler.rangechecks.TestRangeCheckEliminationDisabled
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user