This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33498] [4.2/4.3 Regression] Optimizer (-O2) may convert a normal loop to infinite
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2007 15:53:13 -0000
- Subject: [Bug tree-optimization/33498] [4.2/4.3 Regression] Optimizer (-O2) may convert a normal loop to infinite
- References: <bug-33498-15115@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-09-19 15:53 -------
Confirmed. IVOPTs chooses to replace the exit test by one that is true
only after signed overflow. SCEV/VRP happily optimizes this away.
<bb 2>:
ivtmp.52_2 = (long unsigned int) value_8;
# ivtmp.52_16 = PHI <ivtmp.52_12(4), ivtmp.52_2(2)>;
# val_18 = PHI <val_10(4), 50462976(2)>;
<L0>:;
MEM[index: ivtmp.52_16]{*D.1961} = val_18;
val_10 = val_18 + 67372036;
ivtmp.52_12 = ivtmp.52_16 + 4;
if (val_10 != 67305984) goto <L5>; else goto <L2>;
<L5>:;
goto <bb 3> (<L0>);
<L2>:;
return;
The same happens with trunk. Zdenek?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org, rakdver at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2007-09-19 15:53:13
date| |
Summary|Optimizer (-O2) may convert |[4.2/4.3 Regression]
|a normal loop to infinite |Optimizer (-O2) may convert
| |a normal loop to infinite
Target Milestone|--- |4.2.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498