This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/36758] [4.3/4.4 Regression] addition moved out of the loop when used with an argument
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Sep 2008 02:52:00 -0000
- Subject: [Bug rtl-optimization/36758] [4.3/4.4 Regression] addition moved out of the loop when used with an argument
- References: <bug-36758-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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