Skip to content

Commit a8a8b2d

Browse files
author
Igor Veresov
committed
8341831: PhaseCFG::insert_anti_dependences asserts with "no loads"
Reviewed-by: dlong, kvn
1 parent 9e262df commit a8a8b2d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/hotspot/share/opto/gcm.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,17 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
763763
worklist_def_use_mem_states.pop();
764764

765765
uint op = use_mem_state->Opcode();
766-
assert(!use_mem_state->needs_anti_dependence_check(), "no loads");
766+
767+
#ifdef ASSERT
768+
// CacheWB nodes are peculiar in a sense that they both are anti-dependent and produce memory.
769+
// Allow them to be treated as a store.
770+
bool is_cache_wb = false;
771+
if (use_mem_state->is_Mach()) {
772+
int ideal_op = use_mem_state->as_Mach()->ideal_Opcode();
773+
is_cache_wb = (ideal_op == Op_CacheWB);
774+
}
775+
assert(!use_mem_state->needs_anti_dependence_check() || is_cache_wb, "no loads");
776+
#endif
767777

768778
// MergeMems do not directly have anti-deps.
769779
// Treat them as internal nodes in a forward tree of memory states,

test/hotspot/jtreg/ProblemList.txt

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343

4444
# :hotspot_compiler
4545

46-
applications/ctw/modules/java_base_2.java 8341831 linux-x64
47-
4846
compiler/ciReplay/TestSAServer.java 8029528 generic-all
4947
compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic-all
5048

0 commit comments

Comments
 (0)