Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8343907

C2: Constants without root as control in PhaseIdealLoop::split_thru_phi

XMLWordPrintable

      In PhaseIdealLoop::split_thru_phi, loop opts.cpp:191 the code snippet

      if (x->is_Con()) {
            // Constant's control is always root.
            set_root_as_ctrl(x);
            continue;
          }

      sets control of constants to root. This seems suspicious as constants in loop opts should always have their control set to root. However, adding an assert (assert(get_ctrl(x) == C->root(), "constant without root control");) inside the if to test this assumption, immediately triggers with --version.

      This code should be re-examined to ensure this is not just a band-aid solution.

      Discussion:
      https://github.com/openjdk/jdk/pull/21836#discussion_r1834827466

            Unassigned Unassigned
            tweidmann Theo Weidmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: