C2: PhaseIdealLoop::do_range_check does not work with test that does not exit the loop

XMLWordPrintable

    • 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.

            Assignee:
            Unassigned
            Reporter:
            Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: