This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/54589] struct offset add should be folded into address calculation


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*, i?86-*-*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |missed-optimization
   Last reconfirmed|                            |2012-09-17
          Component|tree-optimization           |target
     Ever Confirmed|0                           |1
            Summary|[missed-optimization]       |struct offset add should be
                   |struct offset add should be |folded into address
                   |folded into address         |calculation
                   |calculation                 |
      Known to fail|                            |4.6.3, 4.7.2, 4.8.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-17 08:49:25 UTC ---
As there is no loop involved it is RTL fwprop or combines job to eventually
do this.  I see

func:
.LFB517:
        .cfi_startproc
        movzbl  (%rsi), %eax
        addq    $1, %rax
        salq    $4, %rax
        movl    (%rdi,%rax), %eax
        movl    %eax, (%rdx)
        ret

for both 4.7 and 4.8.  i?86 is even worse.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]