From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12846 invoked by alias); 25 Nov 2004 18:33:15 -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 12736 invoked by uid 48); 25 Nov 2004 18:33:04 -0000 Date: Thu, 25 Nov 2004 18:33:00 -0000 Message-ID: <20041125183304.12735.qmail@sourceware.org> From: "uweigand at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041110164413.18420.jgrimm2@us.ibm.com> References: <20041110164413.18420.jgrimm2@us.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/18420] [4.0 Regression] ICE compiling mesa at -O2 X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg03094.txt.bz2 List-Id: ------- Additional Comments From uweigand at gcc dot gnu dot org 2004-11-25 18:33 ------- Now that RTH's validate_subreg patch is in, I guess the right fix for this problem might be to always return a SUBREG in simplify_gen_subreg unless that SUBREG is actually invalid. What do you think of this patch: Index: simplify-rtx.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v retrieving revision 1.211 diff -c -p -r1.211 simplify-rtx.c *** simplify-rtx.c 24 Nov 2004 00:09:03 -0000 1.211 --- simplify-rtx.c 25 Nov 2004 18:29:38 -0000 *************** simplify_gen_subreg (enum machine_mode o *** 3782,3792 **** if (newx) return newx; ! if (GET_CODE (op) == SUBREG || GET_MODE (op) == VOIDmode ! || (REG_P (op) && REGNO (op) < FIRST_PSEUDO_REGISTER)) ! return NULL_RTX; ! ! if (validate_subreg (outermode, innermode, op, byte)) return gen_rtx_SUBREG (outermode, op, byte); return NULL_RTX; --- 3782,3788 ---- if (newx) return newx; ! if (REG_P (op) && validate_subreg (outermode, innermode, op, byte)) return gen_rtx_SUBREG (outermode, op, byte); return NULL_RTX; (B.t.w. shouldn't validate_subreg reject non-REG inputs itself?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18420