[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-10 Thread amonakov at gcc dot gnu dot org
--- Comment #9 from amonakov at gcc dot gnu dot org 2010-03-10 12:54 --- Subject: Bug 43236 Author: amonakov Date: Wed Mar 10 12:53:51 2010 New Revision: 157339 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157339 Log: PR tree-optimization/43236 *

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-10 Thread amonakov at gcc dot gnu dot org
--- Comment #10 from amonakov at gcc dot gnu dot org 2010-03-10 12:57 --- Both issues are fixed with above commit. -- amonakov at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-10 Thread sezeroz at gmail dot com
--- Comment #11 from sezeroz at gmail dot com 2010-03-10 14:17 --- The testcase fails with 4.4 with -Ox -ftree-loop-distribution and the patch does not apply to 4.4. Will there be a gcc-4.4 backport of this? -- sezeroz at gmail dot com changed: What|Removed

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-09 Thread amonakov at gcc dot gnu dot org
--- Comment #8 from amonakov at gcc dot gnu dot org 2010-03-09 16:55 --- Given the fact that loop distribution only works for two-bb loops, I think the fix is to simply take number of latch executions when the stmt is in the latch. diff --git a/gcc/tree-loop-distribution.c

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-03 Thread rguenth at gcc dot gnu dot org
--- Comment #5 from rguenth at gcc dot gnu dot org 2010-03-03 10:38 --- Confirmed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC|

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-03 Thread amonakov at gcc dot gnu dot org
--- Comment #6 from amonakov at gcc dot gnu dot org 2010-03-03 13:06 --- Not a regression, off-by-one error in reverse iteration case is since day one. Patch: diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 13ac7ea..110abdc 100644 ---

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-03 Thread amonakov at gcc dot gnu dot org
--- Comment #7 from amonakov at gcc dot gnu dot org 2010-03-03 13:38 --- (In reply to comment #6) This fixes the -O[123] miscompilations. -Os is slightly harder to fix, since we use wrong number of iterations (cond bb is executed 11 times, latch bb with assignment 10 times). I

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-02 Thread zsojka at seznam dot cz
--- Comment #1 from zsojka at seznam dot cz 2010-03-02 20:20 --- Created an attachment (id=20005) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20005action=view) this patch causes bootstrap with BOOT_CFLAGS=-O2 -ftree-loop-distribution to assert Assert message is:

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-02 Thread zsojka at seznam dot cz
--- Comment #2 from zsojka at seznam dot cz 2010-03-02 20:33 --- Created an attachment (id=20006) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20006action=view) this patch causes regular bootstrap to assert Assert message is: /mnt/svn/gcc-trunk/libgcc/../gcc/libgcc2.c: In

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-02 Thread zsojka at seznam dot cz
--- Comment #3 from zsojka at seznam dot cz 2010-03-03 06:26 --- Created an attachment (id=20008) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20008action=view) minimal executable testcase Fails when compiled with -ftree-loop-distribution at all -O[123s] levels: $

[Bug tree-optimization/43236] -ftree-loop-distribution produces wrong code in reload1.c:delete_output_reload(), bootstrap fails

2010-03-02 Thread zsojka at seznam dot cz
--- Comment #4 from zsojka at seznam dot cz 2010-03-03 06:30 --- (In reply to comment #3) When output is uncommented, -Os shows different behaviour than -O[123] (but still wrong): -Os zeroes items [8] - [18] -O[123] zeroes [9] - [18] expected is [10] - [19] --