public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27847]  New: inlined return of a byte partial unoptimized
@ 2006-05-31 19:32 familie dot glaser at web dot de
  2006-05-31 19:36 ` [Bug c/27847] " familie dot glaser at web dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: familie dot glaser at web dot de @ 2006-05-31 19:32 UTC (permalink / raw)
  To: gcc-bugs

In some cases a inlined return of just a byte produce unnecessary treatment of
the high byte, like it should fulfill the ABI calling convention.

The problem with the unoptimized inlined returs seams (after some trials) to
raise (long) after constant assignment in combination with other facts.

The example is compiled with gcc/avr/3.4.5, gnu99 and -Os, but the same effects
are visible in combinations with gnu++98 and -O3.

To show the difference between the oldstyle #define-macro and a inline function
which should  be 'as fast as a macro' I feed the .c-source instead of the
.i-file.


-- 
           Summary: inlined return of a byte partial unoptimized
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: familie dot glaser at web dot de
  GCC host triplet: WIN
GCC target triplet: AVR


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
  2006-05-31 19:36 ` [Bug c/27847] " familie dot glaser at web dot de
@ 2006-05-31 19:36 ` pinskia at gcc dot gnu dot org
  2006-05-31 19:37 ` familie dot glaser at web dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-31 19:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-31 19:36 -------
Can you try 4.0.x or 4.1.x, I think this and many other inlining related missed
optimzations were fixed in 4.0.x and above.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end
           Keywords|                            |missed-optimization
            Version|unknown                     |3.4.5


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


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

* [Bug c/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
@ 2006-05-31 19:36 ` familie dot glaser at web dot de
  2006-05-31 19:36 ` [Bug middle-end/27847] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: familie dot glaser at web dot de @ 2006-05-31 19:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from familie dot glaser at web dot de  2006-05-31 19:35 -------
Created an attachment (id=11557)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11557&action=view)
source (without includes)


-- 


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
  2006-05-31 19:36 ` [Bug c/27847] " familie dot glaser at web dot de
  2006-05-31 19:36 ` [Bug middle-end/27847] " pinskia at gcc dot gnu dot org
@ 2006-05-31 19:37 ` familie dot glaser at web dot de
  2006-05-31 19:38 ` familie dot glaser at web dot de
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: familie dot glaser at web dot de @ 2006-05-31 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from familie dot glaser at web dot de  2006-05-31 19:36 -------
Created an attachment (id=11558)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11558&action=view)
commented assembler-listing


-- 


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
                   ` (3 preceding siblings ...)
  2006-05-31 19:38 ` familie dot glaser at web dot de
@ 2006-05-31 19:38 ` pinskia at gcc dot gnu dot org
  2006-05-31 19:46 ` familie dot glaser at web dot de
  2006-05-31 22:19 ` eweddington at cso dot atmel dot com
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-31 19:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-05-31 19:37 -------
Yes this was fixed in 4.0.0.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
                   ` (2 preceding siblings ...)
  2006-05-31 19:37 ` familie dot glaser at web dot de
@ 2006-05-31 19:38 ` familie dot glaser at web dot de
  2006-05-31 19:38 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: familie dot glaser at web dot de @ 2006-05-31 19:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from familie dot glaser at web dot de  2006-05-31 19:38 -------
Created an attachment (id=11559)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11559&action=view)
gcc -save-temps output


-- 


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
                   ` (4 preceding siblings ...)
  2006-05-31 19:38 ` pinskia at gcc dot gnu dot org
@ 2006-05-31 19:46 ` familie dot glaser at web dot de
  2006-05-31 22:19 ` eweddington at cso dot atmel dot com
  6 siblings, 0 replies; 8+ messages in thread
From: familie dot glaser at web dot de @ 2006-05-31 19:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from familie dot glaser at web dot de  2006-05-31 19:45 -------
(In reply to comment #4)
> Yes this was fixed in 4.0.0.

Thanks a lot, hope it will find the way to WinAVR soon.


-- 


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


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

* [Bug middle-end/27847] inlined return of a byte partial unoptimized
  2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
                   ` (5 preceding siblings ...)
  2006-05-31 19:46 ` familie dot glaser at web dot de
@ 2006-05-31 22:19 ` eweddington at cso dot atmel dot com
  6 siblings, 0 replies; 8+ messages in thread
From: eweddington at cso dot atmel dot com @ 2006-05-31 22:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from eweddington at cso dot atmel dot com  2006-05-31 22:19 -------
(In reply to comment #6)
> Thanks a lot, hope it will find the way to WinAVR soon.

Yes, it will.


-- 

eweddington at cso dot atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eweddington at cso dot atmel
                   |                            |dot com


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


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

end of thread, other threads:[~2006-05-31 22:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-31 19:32 [Bug c/27847] New: inlined return of a byte partial unoptimized familie dot glaser at web dot de
2006-05-31 19:36 ` [Bug c/27847] " familie dot glaser at web dot de
2006-05-31 19:36 ` [Bug middle-end/27847] " pinskia at gcc dot gnu dot org
2006-05-31 19:37 ` familie dot glaser at web dot de
2006-05-31 19:38 ` familie dot glaser at web dot de
2006-05-31 19:38 ` pinskia at gcc dot gnu dot org
2006-05-31 19:46 ` familie dot glaser at web dot de
2006-05-31 22:19 ` eweddington at cso dot atmel 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).