------- Additional Comments From dje at watson dot ibm dot com 2004-12-06 17:16 ------- Subject: Re: [4.0 Regression] Another ICE caused by reload of a psuedo reg into f0 for a DImode expr
The following patch implements the two suggestions. It fixes the ICE on AIX, but continues to produce an ICE on Mac OS X. Also, the CONST_INT case only should be relevant in 64-bit mode. Index: rs6000.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v retrieving revision 1.348 diff -c -p -r1.348 rs6000.h *** rs6000.h 27 Nov 2004 22:45:24 -0000 1.348 --- rs6000.h 6 Dec 2004 17:14:18 -0000 *************** enum reg_class *** 1397,1404 **** */ #define PREFERRED_RELOAD_CLASS(X,CLASS) \ ! (((GET_CODE (X) == CONST_DOUBLE \ ! && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ ? NO_REGS \ : (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT \ && (CLASS) == NON_SPECIAL_REGS) \ --- 1397,1404 ---- */ #define PREFERRED_RELOAD_CLASS(X,CLASS) \ ! (((CONSTANT_P (X) \ ! && reg_classes_intersect_p ((CLASS), FLOAT_REGS)) \ ? NO_REGS \ : (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT \ && (CLASS) == NON_SPECIAL_REGS) \ Index: rs6000.md =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v retrieving revision 1.336 diff -c -p -r1.336 rs6000.md *** rs6000.md 1 Dec 2004 17:18:38 -0000 1.336 --- rs6000.md 6 Dec 2004 17:14:18 -0000 *************** *** 8496,8502 **** ; List r->r after r->"o<>", otherwise reload will try to reload a ; non-offsettable address by using r->r which won't make progress. (define_insn "*movdi_internal32" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=o<>,r,r,f,f,m,r") (match_operand:DI 1 "input_operand" "r,r,m,f,m,f,IJKnGHF"))] "! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) --- 8496,8502 ---- ; List r->r after r->"o<>", otherwise reload will try to reload a ; non-offsettable address by using r->r which won't make progress. (define_insn "*movdi_internal32" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=o<>,r,r,!*f,!*f,m,r") (match_operand:DI 1 "input_operand" "r,r,m,f,m,f,IJKnGHF"))] "! TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) *************** *** 8567,8573 **** }") (define_insn "*movdi_internal64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,??f,f,m,r,*h,*h") (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] "TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) --- 8567,8573 ---- }") (define_insn "*movdi_internal64" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,!*f,!*f,m,r,*h,*h") (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] "TARGET_POWERPC64 && (gpc_reg_operand (operands[0], DImode) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18641