public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/45335] Use ldrd to load two consecutive words
       [not found] <bug-45335-4@http.gcc.gnu.org/bugzilla/>
@ 2024-02-16  5:27 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-16  5:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45335

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |14.0, 7.3.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
      Known to fail|                            |4.6.4, 5.4.0
   Target Milestone|---                         |7.0

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
6.3.0 produced:

        sub     r1, r4, #16
        ldr     r4, [r4, #-4]
        ldr     r0, .L3+4
        ldm     r1, {r1, r2, r3}

5.4.0 produced:

        sub     r1, r4, #16
        ldr     r4, [r4, #-4]
        ldr     r0, .L3+4
        ldmia   r1, {r1, r2, r3}

7.40 produced:

        ldrd    r2, r3, [r4, #-12]
        ldr     r1, [r4, #-16]
        ldrd    r4, r5, [r4, #-4]
        ldr     r0, .L4+4
        strd    r4, r5, [sp]

Which was changed by r7-4653-g2fe3721128b991 or r7-991-g37923729c5ab01 .

The ldrd support was added originally with r0-122648-g4542a38a21fea5 (for GCC
4.9.0).

So closing as fixed.

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

* [Bug target/45335] Use ldrd to load two consecutive words
  2010-08-19  7:18 [Bug target/45335] New: " carrot at google dot com
  2010-08-20  3:13 ` [Bug target/45335] " carrot at google dot com
@ 2010-08-23  8:24 ` ramana at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-08-23  8:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2010-08-23 08:23:52
               date|                            |


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


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

* [Bug target/45335] Use ldrd to load two consecutive words
  2010-08-19  7:18 [Bug target/45335] New: " carrot at google dot com
@ 2010-08-20  3:13 ` carrot at google dot com
  2010-08-23  8:24 ` ramana at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: carrot at google dot com @ 2010-08-20  3:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from carrot at google dot com  2010-08-20 03:13 -------
By simply define the following pattern

(define_insn "*thumb2_ldrd"
  [(parallel [(set (match_operand:SI 0 "s_register_operand" "")
                   (mem:SI (match_operand:SI 2 "" "")))
              (set (match_operand:SI 1 "s_register_operand" "")
                   (mem:SI (match_operand:SI 3 "" "")))])]
  "TARGET_THUMB2 && thumb2_ldrd_addr (operands[2], operands[3])"
  "*
  {
    rtx ldrd_addr = thumb2_ldrd_addr (operands[2], operands[3]);
    operands[4] = gen_rtx_MEM (SImode, ldrd_addr);
    if (ldrd_addr == operands[3])
      return \"ldrd\\t%1, %0, %4\";
    else
      return \"ldrd\\t%0, %1, %4\";
  }"
)

The combine pass can't handle it. The instructions handled by combine should
have some def-use relation. There is no such relation in this case. So another
peephole2 rule is needed to catch the opportunity.

Even though there are chances missed. After register renumbering and
instruction scheduling, more chances are revealed. Change the option -O2 to -Os
can show such an example. So a peephole rule is needed to deal with this case.


-- 


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


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

end of thread, other threads:[~2024-02-16  5:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45335-4@http.gcc.gnu.org/bugzilla/>
2024-02-16  5:27 ` [Bug target/45335] Use ldrd to load two consecutive words pinskia at gcc dot gnu.org
2010-08-19  7:18 [Bug target/45335] New: " carrot at google dot com
2010-08-20  3:13 ` [Bug target/45335] " carrot at google dot com
2010-08-23  8:24 ` ramana 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).