This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17531] [4.0 Regression] [ivopts] ICE compiling gzip deflate.c
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2004 09:09:08 -0000
- Subject: [Bug tree-optimization/17531] [4.0 Regression] [ivopts] ICE compiling gzip deflate.c
- References: <20040917025408.17531.dje@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rakdver at gcc dot gnu dot org 2004-09-17 09:09 -------
This patch should fix the problem; I will submit it once it passes regtesting.
Zdenek
Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.241
diff -c -3 -p -r1.241 optabs.c
*** optabs.c 10 Sep 2004 11:02:24 -0000 1.241
--- optabs.c 17 Sep 2004 09:05:40 -0000
*************** expand_binop (enum machine_mode mode, op
*** 738,748 ****
force expensive constants into a register. */
if (CONSTANT_P (op0) && optimize
&& rtx_cost (op0, binoptab->code) > COSTS_N_INSNS (1))
! op0 = force_reg (mode, op0);
if (CONSTANT_P (op1) && optimize
&& ! shift_op && rtx_cost (op1, binoptab->code) > COSTS_N_INSNS (1))
! op1 = force_reg (mode, op1);
/* Record where to delete back to if we backtrack. */
last = get_last_insn ();
--- 738,756 ----
force expensive constants into a register. */
if (CONSTANT_P (op0) && optimize
&& rtx_cost (op0, binoptab->code) > COSTS_N_INSNS (1))
! {
! if (GET_MODE (op0) != VOIDmode)
! op0 = convert_modes (mode, VOIDmode, op0, unsignedp);
! op0 = force_reg (mode, op0);
! }
if (CONSTANT_P (op1) && optimize
&& ! shift_op && rtx_cost (op1, binoptab->code) > COSTS_N_INSNS (1))
! {
! if (GET_MODE (op1) != VOIDmode)
! op1 = convert_modes (mode, VOIDmode, op1, unsignedp);
! op1 = force_reg (mode, op1);
! }
/* Record where to delete back to if we backtrack. */
last = get_last_insn ();
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17531