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 rtl-optimization/36758] [4.3/4.4 Regression] addition moved out of the loop when used with an argument



------- Comment #12 from pinskia at gcc dot gnu dot org  2008-09-25 02:52 -------
This happens also for x86_64.
on the trunk:
L2:
        movq    %rbx, %rdi
        call    _f0
        testl   %eax, %eax
        jne     L2
4.0.1:
L3:
        leaq    -4(%rbp), %rdi
        call    _f0
        testl   %eax, %eax
        jne     L3

--- CUT ---

With the fwrprop patch which I am working on and disabling move loop
invariants, we get back:
L2:
        leaq    -4(%rbp), %rdi
        call    _f0
        testl   %eax, %eax
        jne     L2

-- CUT ---
move-loop-invariants still moves this out of the loop though.

So to answer Richard's question about this being a target issue, since it is
also happens on x86_64 and move loop invariants does not take into account the
cost of the move instruction, I am going to say this is a move loop invariant
issue (after I fix the fwprop one).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|powerpc*-*-*                |powerpc*-*-*, x86_64


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


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