This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/40086] [4.5 Regression]: cris-elf gfortran.dg/forall_1.f90 -O1 execution
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2009 12:28:21 -0000
- Subject: [Bug rtl-optimization/40086] [4.5 Regression]: cris-elf gfortran.dg/forall_1.f90 -O1 execution
- References: <bug-40086-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from bonzini at gnu dot org 2009-05-11 12:28 -------
It's a latent bug somewhere, possibly in delayed branch scheduling? fwprop1
does a single copy propagation which is trivially valid.
Analyzing -O1 -fno-delayed-branch vs. -O1 -fno-delayed-branch
-fno-forward-propagate, I'm pretty sure that every change remains valid up to
the dbr pass. In particular, as i said, the effect of fwprop is trivial:
L154:
155 NOTE_INSN_BASIC_BLOCK
156 r94:SI=r97:SI+0x1
- 157 r92:SI=r94:SI
158 r126:SI=r8:SI-0xa
159 cc0=[r126:SI+r97:SI]
160 pc={(cc0==0x0)?L165:pc}
@@ -913,7 +906,7 @@
161 NOTE_INSN_BASIC_BLOCK
162 r127:SI=r8:SI-0x41
163 r128:SI=r97:SI<<0x2
- 164 [r127:SI+r128:SI]=r92:SI
+ 164 [r127:SI+r128:SI]=r94:SI
L165:
166 NOTE_INSN_BASIC_BLOCK
168 cc0=cmp(r94:SI,0xa)
Also after register allocation there is no major difference, except that
without fwprop r92 is allocated to the (special?) register $srp, giving:
L154:
155 NOTE_INSN_BASIC_BLOCK
- 265 r9:SI=r13:SI
- 156 r9:SI=r9:SI+0x1
- 157 srp:SI=r9:SI
+ 265 r13:SI=r9:SI
+ 156 r13:SI=r13:SI+0x1
266 r12:SI=r8:SI
158 r12:SI=r12:SI-0xa
REG_EQUIV: r8:SI-0xa
- 159 cc0=[r12:SI+r13:SI]
+ 159 cc0=[r12:SI+r9:SI]
160 pc={(cc0==0x0)?L165:pc}
REG_BR_PROB: 0x1388
161 NOTE_INSN_BASIC_BLOCK
@@ -1025,14 +1009,14 @@
267 r12:SI=r8:SI
243 r12:SI=r12:SI-0x41
REG_EQUIV: r8:SI-0x41
- 164 [r13:SI*0x4+r12:SI]=srp:SI
+ 164 [r9:SI*0x4+r12:SI]=r13:SI
L165:
166 NOTE_INSN_BASIC_BLOCK
- 168 cc0=cmp(r9:SI,0xa)
+ 168 cc0=cmp(r13:SI,0xa)
169 pc={(cc0==0x0)?L167:pc}
REG_BR_PROB: 0x38d
172 NOTE_INSN_BASIC_BLOCK
- 55 r13:SI=r9:SI
+ 55 r9:SI=r13:SI
237 pc=L154
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40086