public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
[not found] <bug-36467-4@http.gcc.gnu.org/bugzilla/>
@ 2011-07-09 9:11 ` gjl at gcc dot gnu.org
2011-07-09 9:13 ` gjl at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-07-09 9:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
--- Comment #5 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-09 09:10:56 UTC ---
Created attachment 24723
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24723
Extendedn test case with size = 15, 16, 17, 18
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
[not found] <bug-36467-4@http.gcc.gnu.org/bugzilla/>
2011-07-09 9:11 ` [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul* gjl at gcc dot gnu.org
@ 2011-07-09 9:13 ` gjl at gcc dot gnu.org
2011-07-20 17:24 ` gjl at gcc dot gnu.org
2011-07-20 17:27 ` gjl at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-07-09 9:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2008-06-08 18:20:52 |2011-07-09 18:20:52
CC| |gjl at gcc dot gnu.org
Target Milestone|--- |4.7.0
Known to fail| |4.6.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
[not found] <bug-36467-4@http.gcc.gnu.org/bugzilla/>
2011-07-09 9:11 ` [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul* gjl at gcc dot gnu.org
2011-07-09 9:13 ` gjl at gcc dot gnu.org
@ 2011-07-20 17:24 ` gjl at gcc dot gnu.org
2011-07-20 17:27 ` gjl at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-07-20 17:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
--- Comment #6 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-20 17:23:31 UTC ---
Author: gjl
Date: Wed Jul 20 17:23:28 2011
New Revision: 176527
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176527
Log:
PR target/36467
PR target/49687
* config/avr/avr.md (mulhi3): Use register_or_s9_operand for
operand2 and expand appropriately if there is a CONST_INT in
operand2.
(usmulqihi3): New insn.
(*sumulqihi3): New insn.
(*osmulqihi3): New insn.
(*oumulqihi3): New insn.
(*muluqihi3.uconst): New insn_and_split.
(*muluqihi3.sconst): New insn_and_split.
(*mulsqihi3.sconst): New insn_and_split.
(*mulsqihi3.uconst): New insn_and_split.
(*mulsqihi3.oconst): New insn_and_split.
(*ashifthi3.signx.const): New insn_and_split.
(*ashifthi3.signx.const7): New insn_and_split.
(*ashifthi3.zerox.const): New insn_and_split.
(mulsqihi3): New insn.
(muluqihi3): New insn.
(muloqihi3): New insn.
* config/avr/predicates.md (const_2_to_7_operand): New.
(const_2_to_6_operand): New.
(u8_operand): New.
(s8_operand): New.
(o8_operand): New.
(s9_operand): New.
(register_or_s9_operand): New.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.md
trunk/gcc/config/avr/predicates.md
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
[not found] <bug-36467-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-07-20 17:24 ` gjl at gcc dot gnu.org
@ 2011-07-20 17:27 ` gjl at gcc dot gnu.org
3 siblings, 0 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-07-20 17:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-20 17:26:03 UTC ---
Closed as FIXED: Reworked (widening) 16-bit multiply.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
2008-06-08 17:57 [Bug target/36467] New: " eric dot weddington at atmel dot com
` (2 preceding siblings ...)
2008-06-08 18:09 ` eric dot weddington at atmel dot com
@ 2008-06-08 18:21 ` hutchinsonandy at gcc dot gnu dot org
3 siblings, 0 replies; 8+ messages in thread
From: hutchinsonandy at gcc dot gnu dot org @ 2008-06-08 18:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hutchinsonandy at gcc dot gnu dot org 2008-06-08 18:20 -------
It makes sense in one respect
We don't have fast shift by 4 bits and code defaults to loop for Os. Seems we
should be selective as MUL is indeed shorter.
Though I think gcc may be confused by our poor cost data and perhaps was alsp
mislead into using shift instead of MUL.
--
hutchinsonandy at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-06-08 18:20:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
2008-06-08 17:57 [Bug target/36467] New: " eric dot weddington at atmel dot com
2008-06-08 17:58 ` [Bug target/36467] " eric dot weddington at atmel dot com
2008-06-08 17:59 ` eric dot weddington at atmel dot com
@ 2008-06-08 18:09 ` eric dot weddington at atmel dot com
2008-06-08 18:21 ` hutchinsonandy at gcc dot gnu dot org
3 siblings, 0 replies; 8+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-08 18:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from eric dot weddington at atmel dot com 2008-06-08 18:08 -------
Generated code when structure size is 16 (test.i):
funct:
/* prologue: function */
/* frame size = 0 */
lds r24,head
mov r30,r24
clr r31
sbrc r30,7
com r31
ldi r24,4
1: lsl r30
rol r31
dec r24
brne 1b
subi r30,lo8(-(qq))
sbci r31,hi8(-(qq))
ld r24,Z
sbrc r24,1
std Z+1,__zero_reg__
.L3:
ret
Generated code when structure size is 17 (test2.i):
funct:
/* prologue: function */
/* frame size = 0 */
lds r24,head
ldi r25,lo8(17)
muls r24,r25
movw r30,r0
clr r1
subi r30,lo8(-(qq))
sbci r31,hi8(-(qq))
ld r24,Z
sbrc r24,1
std Z+1,__zero_reg__
.L3:
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
2008-06-08 17:57 [Bug target/36467] New: " eric dot weddington at atmel dot com
2008-06-08 17:58 ` [Bug target/36467] " eric dot weddington at atmel dot com
@ 2008-06-08 17:59 ` eric dot weddington at atmel dot com
2008-06-08 18:09 ` eric dot weddington at atmel dot com
2008-06-08 18:21 ` hutchinsonandy at gcc dot gnu dot org
3 siblings, 0 replies; 8+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-08 17:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from eric dot weddington at atmel dot com 2008-06-08 17:58 -------
Created an attachment (id=15735)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15735&action=view)
Test case with structure size == 17.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul*
2008-06-08 17:57 [Bug target/36467] New: " eric dot weddington at atmel dot com
@ 2008-06-08 17:58 ` eric dot weddington at atmel dot com
2008-06-08 17:59 ` eric dot weddington at atmel dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-08 17:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from eric dot weddington at atmel dot com 2008-06-08 17:57 -------
Created an attachment (id=15734)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15734&action=view)
Test case with structure size == 16.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36467
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-20 17:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-36467-4@http.gcc.gnu.org/bugzilla/>
2011-07-09 9:11 ` [Bug target/36467] [avr] Missed optimization with pointer arithmetic and mul* gjl at gcc dot gnu.org
2011-07-09 9:13 ` gjl at gcc dot gnu.org
2011-07-20 17:24 ` gjl at gcc dot gnu.org
2011-07-20 17:27 ` gjl at gcc dot gnu.org
2008-06-08 17:57 [Bug target/36467] New: " eric dot weddington at atmel dot com
2008-06-08 17:58 ` [Bug target/36467] " eric dot weddington at atmel dot com
2008-06-08 17:59 ` eric dot weddington at atmel dot com
2008-06-08 18:09 ` eric dot weddington at atmel dot com
2008-06-08 18:21 ` hutchinsonandy 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).