From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28296 invoked by alias); 4 Aug 2005 16:06:20 -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 27957 invoked by uid 48); 4 Aug 2005 16:05:51 -0000 Date: Thu, 04 Aug 2005 16:06:00 -0000 From: "rsandifo at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050804160546.23233.rsandifo@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/23233] New: Loop optimisation ICE for subreg addresses X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg00453.txt.bz2 List-Id: This testcase causes an ICE at -O2: void foo (volatile long long *x) { while (*x) { *x = 0; *((volatile char *) 0) = 0; } } with: error: unrecognizable insn: (insn:HI 25 21 27 2 (set (mem/v:QI (subreg:SI (reg:DI 124) 4) [0 S1 A8]) (subreg:QI (reg:DI 124) 7)) -1 (nil) (expr_list:REG_EQUAL (const_int 0 [0x0]) (nil))) The bug is in the loop,c movables code. There are two loop-invariant registers with the value 0, one SImode and one DImode. loop decides to combine them and replaces uses of the SImode register with the DImode one. This turns the address in the MEM from an SImode REG to an SImode SUBREG of a DImode reg, and powerpc's GO_IF_LEGITIMATE_ADDRESS doesn't allow that. -- Summary: Loop optimisation ICE for subreg addresses Product: gcc Version: 3.4.4 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: rsandifo at gcc dot gnu dot org ReportedBy: rsandifo at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23233