public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103221] New: evrp removes |SIGN but does not propagate the ssa name
@ 2021-11-13  6:54 pinskia at gcc dot gnu.org
  2021-11-15  9:01 ` [Bug tree-optimization/103221] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-13  6:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103221
           Summary: evrp removes |SIGN but does not propagate the ssa name
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
signed char f(signed char a)
{
  signed char v;
  v = a;
  if (a < 0)
    v = a | -128;
  return v;
}
---- CUT ----
EVRP is able to remove the | -128 part but still left with:
  if (a_2(D) < 0)
    goto <bb 3>; [INV]
  else
    goto <bb 4>; [INV]

  <bb 3> :
  v_4 = a_2(D);

  <bb 4> :
  # v_1 = PHI <a_2(D)(2), v_4(3)>
  return v_1;

But the PHI should be removed and the function should have been at this point
just "return a_2(D);".

Note this is not a regression and even the original VRP had a similar issue
too.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-12 20:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13  6:54 [Bug tree-optimization/103221] New: evrp removes |SIGN but does not propagate the ssa name pinskia at gcc dot gnu.org
2021-11-15  9:01 ` [Bug tree-optimization/103221] " rguenth at gcc dot gnu.org
2021-11-23 20:20 ` amacleod at redhat dot com
2021-11-25 15:21 ` amacleod at redhat dot com
2021-12-25  9:59 ` pinskia at gcc dot gnu.org
2022-01-12 20:45 ` amacleod at redhat dot com
2022-01-12 20:52 ` pinskia at gcc dot gnu.org
2022-01-12 20:59 ` amacleod at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).