https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69014

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #4 from ktkachov at gcc dot gnu.org ---
I'm still looking into why the wrong-code occurs but there's a code quality
regression between 4.8 and 4.9 at the tree-level.
At expand time for 4.8 the function foo looks like:
foo ()
{
;;   basic block 2, loop depth 0
;;    pred:       ENTRY
  blah = 1;
  return 1;
;;    succ:       EXIT

}

whereas for 4.9 it's:
foo ()
{
  int blah_lsm.4;
  int i;
  int _8;

;;   basic block 2, loop depth 0
;;    pred:       ENTRY
  goto <bb 4>;
;;    succ:       4

;;   basic block 3, loop depth 2
;;   Invalid sum of incoming frequencies 7656, should be 8750
;;    pred:       5
  blah_lsm.4_3 = 1;
  if (i_7 == 6)
    goto <bb 5>;
  else
    goto <bb 4>;
;;    succ:       5
;;                4

;;   basic block 4, loop depth 1
;;   Invalid sum of incoming frequencies 9998, should be 8748
;;    pred:       3
;;                2
  # i_11 = PHI <i_7(3), 0(2)>
;;    succ:       5

;;   basic block 5, loop depth 2
;;    pred:       3
;;                4
  # i_12 = PHI <i_7(3), i_11(4)>
  # blah_lsm.4_6 = PHI <blah_lsm.4_3(3), 0(4)>
  i_7 = i_12 + 1;
  if (i_7 <= 6)
    goto <bb 3>;
  else
    goto <bb 6>;
;;    succ:       3
;;                6

;;   basic block 6, loop depth 0
;;   Invalid sum of incoming frequencies 1094, should be 1250
;;    pred:       5
  # blah_lsm.4_14 = PHI <blah_lsm.4_6(5)>
  blah = blah_lsm.4_14;
  _8 = blah_lsm.4_6;
  return _8;
;;    succ:       EXIT

}

I've attached the dom1 dumps from 4.8 and 4.9.
Jeff, do you have any insight into what is happening?

Reply via email to