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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-11-20
     Ever confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Heh, what a coincidence!  This is something I run into while working on the
bswap store-merging support, from wondering why bswap pass needs dominance info
I've noticed it uses it exactly to pick the last from the loads rather than say
the first one if it is in multiple basic blocks and added to my todo list that
that is something needed for the store merging itself too.

Note, it probably isn't sufficient, we could have:
  int a = q[0];
  foo (a); /* Some function that conditionally exits, throws externally or
loops forever.  */
  int b = q[1]; /* q[1] might not be mapped if foo exits/throws/loops forever. 
*/
  p[0] = a;
  p[1] = b;
Wonder if we need to (perhaps lazily) compute uids of stmts in certain bbs and
use that to compute which of the loads is last.

Reply via email to