public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/57968] New: MODE_EXIT switches inserted too late
@ 2013-07-24 11:55 amylaar at gcc dot gnu.org
  2013-07-24 12:08 ` [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early amylaar at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-07-24 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57968
           Summary: MODE_EXIT switches inserted too late
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amylaar at gcc dot gnu.org

I see a miscompilation of ___muldi3 for epiphany-elf; the witch to MODE_EXIT
is done at the start of the exit block, even though it contains instructions
that require a different mode.

The return register on the epiphany is not likely spilled, and a large register
file gives lots of freedom to do optimizations; when optimizig ___muldi3, at
end end the return value is not so much copied as calculated piecemeal.

There is some existing code in compute_pre_exit that is supposed to preserve
computations that need a non-exit mode, but the way it is placed means it is
only active when the immediate result is part of the return register.


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

* [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early
  2013-07-24 11:55 [Bug rtl-optimization/57968] New: MODE_EXIT switches inserted too late amylaar at gcc dot gnu.org
@ 2013-07-24 12:08 ` amylaar at gcc dot gnu.org
  2013-07-30 10:25 ` chrbr at gcc dot gnu.org
  2024-03-09 23:46 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-07-24 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> ---
A patch is here:
http://gcc.gnu.org/ml/gcc-patches/2013-07/msg01081.html


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

* [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early
  2013-07-24 11:55 [Bug rtl-optimization/57968] New: MODE_EXIT switches inserted too late amylaar at gcc dot gnu.org
  2013-07-24 12:08 ` [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early amylaar at gcc dot gnu.org
@ 2013-07-30 10:25 ` chrbr at gcc dot gnu.org
  2024-03-09 23:46 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: chrbr at gcc dot gnu.org @ 2013-07-30 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

chrbr at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chrbr at gcc dot gnu.org

--- Comment #2 from chrbr at gcc dot gnu.org ---
Created attachment 30571
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30571&action=edit
Same issue on SH4

Same problem with the attached test on 4.8.1 SH4 whereas I also see the EXIT
block inserted before the FP use.

Testing with your patch on 4.8


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

* [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early
  2013-07-24 11:55 [Bug rtl-optimization/57968] New: MODE_EXIT switches inserted too late amylaar at gcc dot gnu.org
  2013-07-24 12:08 ` [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early amylaar at gcc dot gnu.org
  2013-07-30 10:25 ` chrbr at gcc dot gnu.org
@ 2024-03-09 23:46 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-09 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |4.9.0
         Resolution|---                         |FIXED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed a long time ago: r0-124444-gce4a94223ea08c (for GCC 4.9.0).

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

end of thread, other threads:[~2024-03-09 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-24 11:55 [Bug rtl-optimization/57968] New: MODE_EXIT switches inserted too late amylaar at gcc dot gnu.org
2013-07-24 12:08 ` [Bug rtl-optimization/57968] MODE_EXIT switches inserted too early amylaar at gcc dot gnu.org
2013-07-30 10:25 ` chrbr at gcc dot gnu.org
2024-03-09 23:46 ` pinskia 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).