[Bug rtl-optimization/18420] [4.0 Regression] ICE compiling mesa at -O2
uweigand at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Nov 25 18:33:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list