C2 can not merge homogeneous adjacent two If

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 21
    • Component/s: hotspot

          public static void test(int a, int b) { // ok, identical ifs, apply split_if
              if (a == b) {
                  int_field = 0x42;
              } else {
                  int_field = 42;
              }
              if (a == b) {
                  int_field = 0x42;
              } else {
                  int_field = 42;
              }
          }

          public static void test(int a, int b) { // do nothing
              if (a == b) {
                  int_field = 0x42;
              } else {
                  int_field = 42;
              }
              if (b == a) {
                  int_field = 0x42;
              } else {
                  int_field = 42;
              }
          }

            Assignee:
            Yi Yang
            Reporter:
            Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: