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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |11.0
         Resolution|---                         |FIXED

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r11-408-g84935c9822183c:
/app/example.cpp:22:8: optimized: sinking common stores to *this_5(D).f1
/app/example.cpp:19:52: optimized: sinking common stores with same value to
*this_5(D).f3
/app/example.cpp:19:44: optimized: sinking common stores with same value to
*this_5(D).f2
/app/example.cpp:19:57: optimized: sinking common stores with same value to
*this_5(D).D.4744._vptr.A


At the gimple level we now have:
```
  if (p1_13(D) != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 3> [local count: 536870913]:
  if (p3_14(D) != 0)
    goto <bb 5>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 402653184]:

  <bb 5> [local count: 1073741824]:
  # _20 = PHI <2(3), 1(4), 0(2)>
  *this_5(D).D.4744._vptr.A = &MEM <int (*) ()[4]> [(void *)&_ZTV1D + 8B];
  *this_5(D).f2 = p2_9(D);
  *this_5(D).f3 = p4_11(D);
  *this_5(D).f1 = _20;
```

Reply via email to