public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
@ 2011-05-16 14:36 ` gjl at gcc dot gnu.org
  2011-09-11 21:02 ` gjl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-05-16 14:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-05-16 14:20:25 UTC ---
Author: gjl
Date: Mon May 16 14:20:19 2011
New Revision: 173792

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173792
Log:
    PR target/27663
    PR target/41076
    * config/avr/predicates.md (const_8_16_24_operand): New predicate.
    * config/avr/avr.md ("*ior<mode>qi.byte0",
    "*ior<mode>qi.byte1-3"): New define_insn_and_split patterns.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.md
    trunk/gcc/config/avr/predicates.md


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
  2011-05-16 14:36 ` [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields gjl at gcc dot gnu.org
@ 2011-09-11 21:02 ` gjl at gcc dot gnu.org
  2011-09-11 21:48 ` gjl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-09-11 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-09-11
         AssignedTo|unassigned at gcc dot       |gjl at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-09-11 20:59:28 UTC ---
Created attachment 25242
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25242
Some test cases


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
  2011-05-16 14:36 ` [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields gjl at gcc dot gnu.org
  2011-09-11 21:02 ` gjl at gcc dot gnu.org
@ 2011-09-11 21:48 ` gjl at gcc dot gnu.org
  2012-03-22  8:34 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-09-11 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|avr-elf                     |avr
           Priority|P3                          |P4
            Version|unknown                     |4.6.1
   Target Milestone|---                         |4.7.0
           Severity|normal                      |enhancement


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-09-11 21:48 ` gjl at gcc dot gnu.org
@ 2012-03-22  8:34 ` rguenth at gcc dot gnu.org
  2012-07-02 13:53 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-22  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.0                       |4.7.1

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-22 08:26:23 UTC ---
GCC 4.7.0 is being released, adjusting target milestone.


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-03-22  8:34 ` rguenth at gcc dot gnu.org
@ 2012-07-02 13:53 ` rguenth at gcc dot gnu.org
  2013-01-22 22:31 ` gjl at gcc dot gnu.org
  2014-02-17 16:35 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 13:52:40 UTC ---
Fixed I suppose.


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-07-02 13:53 ` rguenth at gcc dot gnu.org
@ 2013-01-22 22:31 ` gjl at gcc dot gnu.org
  2014-02-17 16:35 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2013-01-22 22:31 UTC (permalink / raw)
  To: gcc-bugs


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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
   Target Milestone|4.7.1                       |---
           Severity|enhancement                 |normal

--- Comment #6 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2013-01-22 22:31:11 UTC ---
(In reply to comment #5)
> Fixed I suppose.

Unfortunately, not

extern unsigned char read8 (void);

unsigned short read16 (void)
{
    unsigned char lo, hi;

    hi = read8();
    lo = read8();
    return lo | hi << 8;
}


with 4.8.0 -S -Os the compiler needs 5 instructions (29, 37, 30, 38) for an
operation that is basically a no-op:


read16:
    push r28     ;  31    pushqi1/1    [length = 1]
/* prologue: function */
/* frame size = 0 */
/* stack size = 1 */
.L__stack_usage = 1
    call read8     ;  5    call_value_insn/2    [length = 2]
    mov r28,r24     ;  6    movqi_insn/1    [length = 1]
    call read8     ;  7    call_value_insn/2    [length = 2]
    mov r18,r28     ;  28    movqi_insn/1    [length = 1]
    ldi r19,0     ;  29    movqi_insn/1    [length = 1]
    mov r19,r18     ;  37    *ashlhi3_const/3    [length = 2]
    clr r18
    or r18,r24     ;  30    iorqi3/1    [length = 1]
    movw r24,r18     ;  38    *movhi/1    [length = 1]
/* epilogue start */
    pop r28     ;  34    popqi    [length = 1]
    ret     ;  35    return_from_epilogue    [length = 1]


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
       [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2013-01-22 22:31 ` gjl at gcc dot gnu.org
@ 2014-02-17 16:35 ` gjl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2014-02-17 16:35 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthijs at stdin dot nl

--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
*** Bug 60145 has been marked as a duplicate of this bug. ***


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

* [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields
  2009-08-15  7:43 [Bug target/41076] New: " pb at gcc dot gnu dot org
@ 2009-08-15  9:55 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-15  9:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-08-15 09:55 -------
because this is what C says you are doing:

  return (unsigned short) ((int) a | ((int) b << 8));

which is harder to transform back into what you expect.


-- 


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


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

end of thread, other threads:[~2014-02-17 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41076-4@http.gcc.gnu.org/bugzilla/>
2011-05-16 14:36 ` [Bug target/41076] [avr] pessimal code for logical OR of 8-bit fields gjl at gcc dot gnu.org
2011-09-11 21:02 ` gjl at gcc dot gnu.org
2011-09-11 21:48 ` gjl at gcc dot gnu.org
2012-03-22  8:34 ` rguenth at gcc dot gnu.org
2012-07-02 13:53 ` rguenth at gcc dot gnu.org
2013-01-22 22:31 ` gjl at gcc dot gnu.org
2014-02-17 16:35 ` gjl at gcc dot gnu.org
2009-08-15  7:43 [Bug target/41076] New: " pb at gcc dot gnu dot org
2009-08-15  9:55 ` [Bug target/41076] " rguenth at gcc dot gnu dot 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).