From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26877 invoked by alias); 26 Jul 2005 13:29:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26842 invoked by uid 48); 26 Jul 2005 13:29:08 -0000 Date: Tue, 26 Jul 2005 13:59:00 -0000 Message-ID: <20050726132908.26840.qmail@sourceware.org> From: "rguenth at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050123014322.19581.pinskia@gcc.gnu.org> References: <20050123014322.19581.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/19581] Missed store motion on the tree level X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg03361.txt.bz2 List-Id: ------- Additional Comments From rguenth at gcc dot gnu dot org 2005-07-26 13:29 ------- For a reduced array with only 4 elements (I know - this should be a --param) we now get in .vars (with the array aliasing patch): f (n) { int n.39; unsigned int ivtmp.33; int lsm_tmp.32; int lsm_tmp.31; int lsm_tmp.30; int lsm_tmp.29; : n.39 = n - 1; if (n.39 != 0) goto ; else goto ; :; lsm_tmp.29 = r[2]; lsm_tmp.30 = r[1]; lsm_tmp.31 = r[3]; lsm_tmp.32 = r[0]; ivtmp.33 = 0; :; lsm_tmp.32 = lsm_tmp.32 + lsm_tmp.31; lsm_tmp.30 = lsm_tmp.32 + lsm_tmp.30; lsm_tmp.29 = lsm_tmp.30 + lsm_tmp.29; lsm_tmp.31 = lsm_tmp.31 + lsm_tmp.29; ivtmp.33 = ivtmp.33 + 1; if (ivtmp.33 != (unsigned int) n.39) goto ; else goto ; :; r[2] = lsm_tmp.29; r[1] = lsm_tmp.30; r[3] = lsm_tmp.31; r[0] = lsm_tmp.32; :; return; } and the asm loop looks like .L4: addl %edx, %eax incl %esi addl %eax, %ecx addl %ecx, %ebx addl %ebx, %edx cmpl %edi, %esi jne .L4 as in exactly what you want. Don't hold your breath for 4.1, though. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2005-06-09 16:37:28 |2005-07-26 13:29:06 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19581