[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-02 20:44 --- Note this also happens on powerpc-darwin too but that would mean it is just semi ppc specific. -- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Component|rtl-optimization|middle-end Summary|[4.0 Regression]|[4.0/4.1 Regression] |Miscompilation on ppc with -|Miscompilation on ppc with - |Os |Os http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290
[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
--- Additional Comments From jakub at gcc dot gnu dot org 2005-03-02 21:16 --- It seems loop_iterations incorrectly counts number of iterations of the second loop: ivtmp.2 = 113; goto bb 4 (L4); L3:; *(ivtmp.52 + 4294967292B) = 9; i = i + 1; L4:; ivtmp.2 = ivtmp.2 - 1; ivtmp.52 = ivtmp.52 + 4B; if (ivtmp.2 != 0) goto L3; else goto L16; L16:; loop's n_iterations is 113, but only the loop header is executed 113 times, while the loop body is executed only 112 times. -- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2005-03-02 20:40:05 |2005-03-02 21:16:56 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290
[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
--- Additional Comments From jakub at gcc dot gnu dot org 2005-03-02 23:09 --- The bug goes away with -Os -floop-optimize2, it is just the old loop optimizer that doesn't handle this properly. It seems to me that loop.c really can't do its job correctly if it doesn't detect where the loop header and latch are and if a BIV increments are done in header, latch or body. Zdenek, any ideas what to do with this? -- What|Removed |Added CC||rakdver at gcc dot gnu dot ||org AssignedTo|jakub at gcc dot gnu dot org|unassigned at gcc dot gnu ||dot org Status|ASSIGNED|NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290
[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
-- What|Removed |Added Severity|normal |critical http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290
[Bug middle-end/20290] [4.0/4.1 Regression] Miscompilation on ppc with -Os
--- Additional Comments From rakdver at gcc dot gnu dot org 2005-03-02 23:15 --- As for 4.1, I hope we will get rid of the old loop optimizer. I will check what can be done in 4.0. -- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |rakdver at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20290