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

SuperWord::fix_commutative_inputs checks in_bb(fin1) instead of in_bb(fin2)

XMLWordPrintable

    • b66
    • 9
    • b08

      SonarCloud instance reports a problem here:
      "Identical sub-expressions on both sides of operator "&&"."

        bool swapped = false;

        if (in_bb(gin1) && in_bb(gin2) && in_bb(fin1) && in_bb(fin1)) { // <----
          if (same_origin_idx(gin1, fin1) &&
              same_origin_idx(gin2, fin2)) {
            return true; // nothing to fix
          }

      I believe it should have been "in_bb(fin1) && in_bb(fin2)".

      Seems to be that way since JDK-8076284.

            kvn Vladimir Kozlov
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: