This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/28126] gcc moves an expensive instruction outside of a conditional
- From: "anemo at mba dot ocn dot ne dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jul 2006 16:34:14 -0000
- Subject: [Bug target/28126] gcc moves an expensive instruction outside of a conditional
- References: <bug-28126-12556@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from anemo at mba dot ocn dot ne dot jp 2006-07-21 16:34 -------
(In reply to comment #6)
> Thanks. With this patch, gcc 4.1.1 produces expected output.
> It seems gcc 4.2 does not move rdhwr before branch without this patch, but I
> can not see why.
I tried to find the reason of this difference between 4.1.1 and 4.2,
and found that the change happend on r108713. The changelog is:
> 2005-12-17 Danny Berlin <dberlin@dberlin.org>
> Kenneth Zadeck <zadeck@naturalbridge.com>
>
> * basic-block.h: Changed basic block numbering so that the entry
> block is 0 and the exit block is 1. Changed insn iterators so
> that they are tolerant of blocks with no insns.
> * regrename.c (copyprop_hardreg_forward): Changed basic block
> numbering so that the entry block is 0 and the exit block is 1.
> ...
While it is too complex for me, I'm still not sure gcc 4.2 really do not need
the patch in comment #2.
Looking at comment #1, it seems gcc 4.2 still need the patch, but I could not
reproduce the same result by daney with 4.2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28126