From: Richard Henderson Date: Thu, 30 May 2002 23:13:20 +0000 (-0700) Subject: re PR rtl-optimization/6822 (GCC 3.1.1 - Internal compiler error in extract_insn... X-Git-Tag: releases/gcc-3.1.1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c5f81191129643926eed6f32a2d09d507e1ed9b;p=thirdparty%2Fgcc.git re PR rtl-optimization/6822 (GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132) PR optimization/6822 * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL to unsigned int for op1 comparisons. Use gen_int_mode. * gcc.c-torture/compile/20020530-1.c: New. Co-Authored-By: Eric Botcazou From-SVN: r54078 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c02fa62304c8..048f65e266a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,12 @@ +2002-05-30 Richard Henderson + Eric Botcazou + + PR optimization/6822 + * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL + to unsigned int for op1 comparisons. Use gen_int_mode. + 2002-05-30 Marc Espie + * config.gcc (sparc64-*-openbsd*): New. * config/sparc/openbsd1-64.h: New. * config/sparc/openbsd64.h: New. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 48f646a14942..337f9f4bf133 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7963,11 +7963,12 @@ ix86_expand_int_movcc (operands) if ((code == LEU || code == GTU) && GET_CODE (ix86_compare_op1) == CONST_INT && mode != HImode - && (unsigned int) INTVAL (ix86_compare_op1) != 0xffffffff - /* The operand still must be representable as sign extended value. */ + && INTVAL (ix86_compare_op1) != -1 + /* For x86-64, the immediate field in the instruction is 32-bit + signed, so we can't increment a DImode value above 0x7fffffff. */ && (!TARGET_64BIT || GET_MODE (ix86_compare_op0) != DImode - || (unsigned int) INTVAL (ix86_compare_op1) != 0x7fffffff) + || INTVAL (ix86_compare_op1) != 0x7fffffff) && GET_CODE (operands[2]) == CONST_INT && GET_CODE (operands[3]) == CONST_INT) { @@ -7975,7 +7976,8 @@ ix86_expand_int_movcc (operands) code = LTU; else code = GEU; - ix86_compare_op1 = GEN_INT (INTVAL (ix86_compare_op1) + 1); + ix86_compare_op1 = gen_int_mode (INTVAL (ix86_compare_op1) + 1, + GET_MODE (ix86_compare_op0)); } start_sequence ();