public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
@ 2003-05-26 20:07 ` dhazeghi@yahoo.com
  2003-05-26 20:16 ` pinskia@physics.uc.edu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: dhazeghi@yahoo.com @ 2003-05-26 20:07 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dhazeghi@yahoo.com  2003-05-26 19:53 -------
Hello,

with gcc 3.3, I get the following code:
        .file   "01.i"
        .text
        .align  2
        .global func2
        .type   func2, %function
func2:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        add     r0, r0, r0, asl #1
        mov     r0, r0, asl #2
        @ lr needed for prologue
        mov     pc, lr
        .size   func2, .-func2
        .align  2
        .global func
        .type   func, %function
func:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, uses_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {fp, ip, lr, pc}
        sub     fp, ip, #4
        bl      func2
        add     r3, r0, r0, asl #1
        rsb     r0, r0, r3, asl #3
        ldmea   fp, {fp, sp, pc}
        .size   func, .-func
        .align  2
        .global main
        .type   main, %function
main:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, uses_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {r4, fp, ip, lr, pc}
        mov     r0, #7
        sub     fp, ip, #4
        bl      func
        mov     r4, r0
        mov     r0, #8
        mov     r4, r4, asl r0
        bl      func
        orr     r4, r4, r0
        mov     r0, r4
        ldmea   fp, {r4, fp, sp, pc}
        .size   main, .-main
        .ident  "GCC: (GNU) 3.3 20030508 (prerelease)"


with gcc mainline (20030508) I get:
        .file   "01.i"
        .text
        .align  2
        .global func2
        .type   func2, %function
func2:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        add     r0, r0, r0, asl #1
        mov     r0, r0, asl #2
        @ lr needed for prologue
        mov     pc, lr
        .size   func2, .-func2
        .align  2
        .global func
        .type   func, %function
func:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, uses_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {fp, ip, lr, pc}
        sub     fp, ip, #4
        bl      func2
        add     r3, r0, r0, asl #1
        rsb     r0, r0, r3, asl #3
        ldmea   fp, {fp, sp, pc}
        .size   func, .-func
        .align  2
        .global main
        .type   main, %function
main:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 1, uses_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {r4, fp, ip, lr, pc}
        mov     r0, #7
        sub     fp, ip, #4
        bl      func
        mov     r4, r0, asl #8
        mov     r0, #8
        bl      func
        orr     r0, r4, r0
        ldmea   fp, {r4, fp, sp, pc}
        .size   main, .-main
        .ident  "GCC: (GNU) 3.4 20030508 (experimental)"

Can you determine whether this is an improvement, or whether the original problem still exists? 
Thanks,

Dara



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
  2003-05-26 20:07 ` [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order dhazeghi@yahoo.com
@ 2003-05-26 20:16 ` pinskia@physics.uc.edu
  2003-06-03 10:19 ` alga@rgai.hu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-26 20:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia@physics.uc.edu  2003-05-26 20:08 -------
See Dara's question.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
  2003-05-26 20:07 ` [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order dhazeghi@yahoo.com
  2003-05-26 20:16 ` pinskia@physics.uc.edu
@ 2003-06-03 10:19 ` alga@rgai.hu
  2003-06-03 10:40 ` dhazeghi@yahoo.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: alga@rgai.hu @ 2003-06-03 10:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


alga@rgai.hu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alga@rgai.hu


------- Additional Comments From alga@rgai.hu  2003-06-03 10:19 -------
>Can you determine whether this is an improvement, or whether the original
>problem still exists? 

The problem is still present on mainline (20030530), but no optimization can be
done for this example.

I attached another example which shows the problem clearly.

Anyway, We wrote down our idea about a possible solution.
See: http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01886.html

Regards,
  Gabor Loki



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
                   ` (2 preceding siblings ...)
  2003-06-03 10:19 ` alga@rgai.hu
@ 2003-06-03 10:40 ` dhazeghi@yahoo.com
  2003-11-09  1:12 ` [Bug optimization/9759] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-03 10:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
  GCC build triplet|                            |i686-pc-linux-gnu
   GCC host triplet|                            |i686-pc-linux-gnu
 GCC target triplet|                            |arm-unknown-elf
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-03 10:40:32
               date|                            |


------- Additional Comments From dhazeghi@yahoo.com  2003-06-03 10:40 -------
Thanks for the feedback Gabor. Hopefully it won't be too long until some 
solution is adopted...



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/9759] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
                   ` (3 preceding siblings ...)
  2003-06-03 10:40 ` dhazeghi@yahoo.com
@ 2003-11-09  1:12 ` pinskia at gcc dot gnu dot org
  2004-03-08  7:49 ` pinskia at gcc dot gnu dot org
  2004-05-13 20:29 ` [Bug tree-optimization/9759] " pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-09  1:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
          Component|target                      |optimization
   Last reconfirmed|2003-06-03 10:40:32         |2003-11-09 01:12:45
               date|                            |
            Summary|[arm] Combine cannot do its |Combine cannot do its job
                   |job due to arithmetic       |due to arithmetic expression
                   |expression evaluation order |evaluation order


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


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

* [Bug optimization/9759] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
                   ` (4 preceding siblings ...)
  2003-11-09  1:12 ` [Bug optimization/9759] " pinskia at gcc dot gnu dot org
@ 2004-03-08  7:49 ` pinskia at gcc dot gnu dot org
  2004-05-13 20:29 ` [Bug tree-optimization/9759] " pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08  7:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 07:49 -------
Suspending as this is fixed on the tree-ssa:
  int T.3;
  int T.2;

<bb 0>:
  T.2 = func (7);
  T.3 = func (8);
  return T.2 << 8 | T.3;


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED
   Target Milestone|---                         |tree-ssa


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


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

* [Bug tree-optimization/9759] Combine cannot do its job due to arithmetic expression evaluation order
       [not found] <20030219170600.9759.lac@rgai.hu>
                   ` (5 preceding siblings ...)
  2004-03-08  7:49 ` pinskia at gcc dot gnu dot org
@ 2004-05-13 20:29 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 20:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-13 11:42 -------
Fixed for 3.5.0 by the merge of the tree-ssa.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |RESOLVED
          Component|rtl-optimization            |tree-optimization
         Resolution|                            |FIXED
   Target Milestone|tree-ssa                    |3.5.0


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


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

end of thread, other threads:[~2004-05-13 11:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030219170600.9759.lac@rgai.hu>
2003-05-26 20:07 ` [Bug target/9759] [arm] Combine cannot do its job due to arithmetic expression evaluation order dhazeghi@yahoo.com
2003-05-26 20:16 ` pinskia@physics.uc.edu
2003-06-03 10:19 ` alga@rgai.hu
2003-06-03 10:40 ` dhazeghi@yahoo.com
2003-11-09  1:12 ` [Bug optimization/9759] " pinskia at gcc dot gnu dot org
2004-03-08  7:49 ` pinskia at gcc dot gnu dot org
2004-05-13 20:29 ` [Bug tree-optimization/9759] " pinskia 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).