-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: hotspot
PhaseIdealLoop::do_range_check has this condition:
// Test is an IfNode, has 2 projections. If BOTH are in the loop
// we need loop unswitching instead of iteration splitting.
Node *exit = loop->is_loop_exit(iff);
if (!exit) continue;
I believe we can get over this limitation. Because the idea of RCE is that for a comparison between a linear expression and a loop-invariant iv * K + L <=> R, we split the loop into pre-main-post loop so that the main loop can constant-fold the comparison.
// Test is an IfNode, has 2 projections. If BOTH are in the loop
// we need loop unswitching instead of iteration splitting.
Node *exit = loop->is_loop_exit(iff);
if (!exit) continue;
I believe we can get over this limitation. Because the idea of RCE is that for a comparison between a linear expression and a loop-invariant iv * K + L <=> R, we split the loop into pre-main-post loop so that the main loop can constant-fold the comparison.