From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20281 invoked by alias); 15 May 2003 18:46:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20220 invoked by uid 71); 15 May 2003 18:46:01 -0000 Date: Thu, 15 May 2003 18:46:00 -0000 Message-ID: <20030515184601.20193.qmail@sources.redhat.com> To: rearnsha@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Daniel Jacobowitz Subject: Re: optimization/8896: '-mcpu=xscale -fno-strict-aliasing -O2' generates wrong code Reply-To: Daniel Jacobowitz X-SW-Source: 2003-05/txt/msg01814.txt.bz2 List-Id: The following reply was made to PR optimization/8896; it has been noted by GNATS. From: Daniel Jacobowitz To: Richard Earnshaw Cc: gcc-gnats@gcc.gnu.org, enrico.scholz@informatik.tu-chemnitz.de, gcc-bugs@gcc.gnu.org Subject: Re: optimization/8896: '-mcpu=xscale -fno-strict-aliasing -O2' generates wrong code Date: Thu, 15 May 2003 14:36:28 -0400 On Thu, Dec 12, 2002 at 03:14:52PM +0000, Richard Earnshaw wrote: > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8896 > > I've attached what I believe to be the fix to the above PR. It would be > helpful if you could give it a whirl. I've added an updated testcase (produced after much labor by Russell King) which shows the problem in 3.2.3. The testcase is extremely delicate. It doesn't show the problem in 3.3 or HEAD, but I wouldn't be at all surprised if the problem was still there. Making a testcase to show it is beyond me though. For the curious, here's a diff of the first differing dump with and without Richard's patch, using the 3.2 CVS branch. It fails using only "-march=armv4 -O2". --- 32.s.22.postreload 2003-05-15 14:29:58.000000000 -0400 +++ 32p.s.22.postreload 2003-05-15 14:29:59.000000000 -0400 @@ -155,18 +155,25 @@ (note 79 843 95 NOTE_INSN_DELETED) (insn 95 79 107 (set (reg/v:SI 11 fp [47]) - (const_int 2 [0x2])) 175 {*arm_movsi_insn} (insn_list:REG_DEP_ANTI 79 (nil)) - (nil)) + (const_int 1 [0x1])) 175 {*arm_movsi_insn} (insn_list:REG_DEP_ANTI 79 (nil)) + (expr_list:REG_EQUAL (const_int 1 [0x1]) + (nil))) + +(note 107 95 117 NOTE_INSN_DELETED) -(note 107 95 129 NOTE_INSN_DELETED) +(insn 117 107 129 (set (reg/v:SI 11 fp [47]) + (plus:SI (reg/v:SI 11 fp [47]) + (reg/f:SI 11 fp))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 107 (insn_list 95 (nil))) + (expr_list:REG_EQUAL (const_int 2 [0x2]) + (nil))) -(note 129 107 135 NOTE_INSN_DELETED) +(note 129 117 135 NOTE_INSN_DELETED) (note 135 129 137 NOTE_INSN_DELETED) (insn 137 135 141 (set (reg/v:SI 11 fp [47]) (plus:SI (reg/v:SI 11 fp [47]) - (reg/f:SI 11 fp))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 129 (insn_list 117 (nil))) + (const_int 1 [0x1]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 129 (insn_list 117 (nil))) (expr_list:REG_EQUAL (const_int 3 [0x3]) (nil))) @@ -177,7 +184,7 @@ (insn 197 141 221 (set (reg/v:SI 11 fp [47]) (plus:SI (reg/v:SI 11 fp [47]) - (const_int 2 [0x2]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 141 (insn_list:REG_DEP_OUTPUT 137 (insn_list 135 (nil)))) + (const_int 3 [0x3]))) 4 {*arm_addsi3} (insn_list:REG_DEP_ANTI 141 (insn_list:REG_DEP_OUTPUT 137 (insn_list 135 (nil)))) (expr_list:REG_EQUAL (const_int 6 [0x6]) (nil))) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer