public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/58166] New: ARMv5: poor register allocation in function containing smull instruction
@ 2013-08-15 12:29 jay.foad at gmail dot com
  2013-08-21 14:29 ` [Bug target/58166] " rearnsha at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jay.foad at gmail dot com @ 2013-08-15 12:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58166
           Summary: ARMv5: poor register allocation in function containing
                    smull instruction
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jay.foad at gmail dot com

Created attachment 30660
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30660&action=edit
C source for testcase

On the attached test case I get:

$ gcc -marm -S -O2 mul.c -o - -fomit-frame-pointer -march=armv5
...
mul:
    @ args = 0, pretend = 0, frame = 0
    @ frame_needed = 0, uses_anonymous_args = 0
    @ link register save eliminated.
    str    r4, [sp, #-4]!
    smull    r3, r4, r0, r1
    mov    r1, r4
    mov    r0, r3
    ldr    r4, [sp], #4
    bx    lr

If the register allocator picked r2 and r3 for the result of the multiply, then
there would be no need to push and pop r4.

I'm using gcc built from svn r201719 configured with --target=arm-eabi.


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

end of thread, other threads:[~2024-03-28  5:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-15 12:29 [Bug target/58166] New: ARMv5: poor register allocation in function containing smull instruction jay.foad at gmail dot com
2013-08-21 14:29 ` [Bug target/58166] " rearnsha at gcc dot gnu.org
2013-08-21 15:14 ` jay.foad at gmail dot com
2013-08-22 10:24 ` jay.foad at gmail dot com
2013-08-22 14:03 ` rearnsha at gcc dot gnu.org
2013-08-22 14:11 ` rearnsha at gcc dot gnu.org
2013-08-25 14:16 ` vmakarov at redhat dot com
2024-03-28  5:08 ` 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).