public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression
@ 2010-11-19  8:39 hubicka at gcc dot gnu.org
  2010-11-19 10:57 ` [Bug middle-end/46555] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-11-19  8:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46555

           Summary: PHI RTL expansion leads to CSiBE regression
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hubicka@gcc.gnu.org


Created attachment 22452
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22452
testcase (OpenTCP-1.0.4/icmp.c)

Hi,
the problem here seems to be worse regalloc and also
  # D.4060_6 = PHI <-1(2), -1(9), -1(11), -1(14), 0(15), -1(10)>
used to be optimized into since set of var to -1 (4 bytes), while now we
produce 3 different copies. 

Crossjumping would unify it, but very late in the game. The problem is that
ifcvt actually moves the set before conditoinal guarding the BB in question, so
the individual sets are drifted earlier to different places in the program.

Doing so might also complicate the regalloc.

Michael, perhaps we can tell out-of-ssa to unify such cases?  They are not that
infrequent (and I think old tree based out-of-ssa did that?)


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

* [Bug middle-end/46555] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
@ 2010-11-19 10:57 ` rguenth at gcc dot gnu.org
  2021-05-14  9:46 ` [Bug middle-end/46555] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-19 10:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46555

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.19 10:55:11
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-19 10:55:11 UTC ---
Yep.  That's one optimization that was removed (out-of-SSA did that) and
we thought of doing this reverse mergephi optimization as a separate pass
before expansion.


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

* [Bug middle-end/46555] [9/10/11/12 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
  2010-11-19 10:57 ` [Bug middle-end/46555] " rguenth at gcc dot gnu.org
@ 2021-05-14  9:46 ` jakub at gcc dot gnu.org
  2021-06-01  8:05 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug middle-end/46555] [9/10/11/12 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
  2010-11-19 10:57 ` [Bug middle-end/46555] " rguenth at gcc dot gnu.org
  2021-05-14  9:46 ` [Bug middle-end/46555] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
@ 2021-06-01  8:05 ` rguenth at gcc dot gnu.org
  2021-09-05 22:35 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug middle-end/46555] [9/10/11/12 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-06-01  8:05 ` rguenth at gcc dot gnu.org
@ 2021-09-05 22:35 ` pinskia at gcc dot gnu.org
  2022-05-27  9:34 ` [Bug middle-end/46555] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-05 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2016-01-05 00:00:00         |2021-9-5

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Still happening on the trunk:
(code_label 164 163 165 24 2 (nil) [5 uses])
(note 165 164 11 24 [bb 24] NOTE_INSN_BASIC_BLOCK)
(insn 11 165 180 24 (set (reg:HI 110 [ <retval> ])
        (const_int -1 [0xffffffffffffffff]))
"/home/jan/Downloads/CSiBE/src/./OpenTCP-1.0.4/icmp.c":112:9 -1
     (nil))
(jump_insn 180 11 181 24 (set (pc)
        (label_ref:SI 170)) 842 {jump}
     (nil)
 -> 170)
(barrier 181 180 183)
(code_label 183 181 182 25 14 (nil) [1 uses])
(note 182 183 12 25 [bb 25] NOTE_INSN_BASIC_BLOCK)
(insn 12 182 170 25 (set (reg:HI 110 [ <retval> ])
        (const_int -1 [0xffffffffffffffff]))
"/home/jan/Downloads/CSiBE/src/./OpenTCP-1.0.4/icmp.c":155:2 -1
     (nil))

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

* [Bug middle-end/46555] [10/11/12/13 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-09-05 22:35 ` pinskia at gcc dot gnu.org
@ 2022-05-27  9:34 ` rguenth at gcc dot gnu.org
  2022-06-28 10:29 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug middle-end/46555] [10/11/12/13 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-05-27  9:34 ` [Bug middle-end/46555] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:29 ` jakub at gcc dot gnu.org
  2023-03-16  0:01 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug middle-end/46555] [10/11/12/13 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-06-28 10:29 ` jakub at gcc dot gnu.org
@ 2023-03-16  0:01 ` pinskia at gcc dot gnu.org
  2023-06-14  5:31 ` [Bug middle-end/46555] [10/11/12/13/14 " pinskia at gcc dot gnu.org
  2023-07-07 10:29 ` [Bug middle-end/46555] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-16  0:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like this was fixed in GCC 12:
  <bb 20> [local count: 344921666]:
  # _30 = PHI <-1(12), 0(17)>
  tbuf ={v} {CLOBBER(eol)};
  return _30;

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

* [Bug middle-end/46555] [10/11/12/13/14 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-03-16  0:01 ` pinskia at gcc dot gnu.org
@ 2023-06-14  5:31 ` pinskia at gcc dot gnu.org
  2023-07-07 10:29 ` [Bug middle-end/46555] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-14  5:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Yep.  That's one optimization that was removed (out-of-SSA did that) and
> we thought of doing this reverse mergephi optimization as a separate pass
> before expansion.

make_forwarders_with_degenerate_phis in tree-ssa-dce.cc does basically (if I
read the code correctly) that which was added by r12-5301-g045206450386 for PR
102880 which is why I am seeing it fixed for GCC 12 at -O2. And the reason why
-O1 I still see the old PHI behavior.

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

* [Bug middle-end/46555] [11/12/13/14 Regression] PHI RTL expansion leads to CSiBE regression
  2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-06-14  5:31 ` [Bug middle-end/46555] [10/11/12/13/14 " pinskia at gcc dot gnu.org
@ 2023-07-07 10:29 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

end of thread, other threads:[~2023-07-07 10:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19  8:39 [Bug middle-end/46555] New: PHI RTL expansion leads to CSiBE regression hubicka at gcc dot gnu.org
2010-11-19 10:57 ` [Bug middle-end/46555] " rguenth at gcc dot gnu.org
2021-05-14  9:46 ` [Bug middle-end/46555] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-06-01  8:05 ` rguenth at gcc dot gnu.org
2021-09-05 22:35 ` pinskia at gcc dot gnu.org
2022-05-27  9:34 ` [Bug middle-end/46555] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:29 ` jakub at gcc dot gnu.org
2023-03-16  0:01 ` pinskia at gcc dot gnu.org
2023-06-14  5:31 ` [Bug middle-end/46555] [10/11/12/13/14 " pinskia at gcc dot gnu.org
2023-07-07 10:29 ` [Bug middle-end/46555] [11/12/13/14 " rguenth at gcc dot gnu.org

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).