public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Eric Botcazou" <ebotcazou@libertysurf.fr> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/6822: GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132 Date: Wed, 29 May 2002 09:16:00 -0000 [thread overview] Message-ID: <20020529161610.31957.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/6822; it has been noted by GNATS. From: "Eric Botcazou" <ebotcazou@libertysurf.fr> To: "Richard Henderson" <rth@redhat.com> Cc: "Glen Nakamura" <glen@imodulo.com>, <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org> Subject: Re: optimization/6822: GCC 3.1.1 - Internal compiler error in extract_insn, at recog.c:2132 Date: Wed, 29 May 2002 18:11:10 +0200 > The problem is that +128 is not a valid QImode constant. > It should have been rendered as -128. This should have > happened during the conversion to rtl, not in the tree > folding code that Eric touched. The conversion from +127 into +128 happens here: (sorry for the ill-formatting) config/i386/i386.c: int ix86_expand_int_movcc (operands) rtx operands[]; { enum rtx_code code = GET_CODE (operands[1]), compare_code; rtx compare_seq, compare_op; rtx second_test, bypass_test; enum machine_mode mode = GET_MODE (operands[0]); /* When the compare code is not LTU or GEU, we can not use sbbl case. In case comparsion is done with immediate, we can convert it to LTU or GEU by altering the integer. */ 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. */ && (!TARGET_64BIT || GET_MODE (ix86_compare_op0) != DImode || (unsigned int) INTVAL (ix86_compare_op1) != 0x7fffffff) && (GET_MODE (ix86_compare_op0) != QImode || (unsigned int) INTVAL (ix86_compare_op1) != 0x7f) && GET_CODE (operands[2]) == CONST_INT && GET_CODE (operands[3]) == CONST_INT) { if (code == LEU) code = LTU; else code = GEU; ix86_compare_op1 = GEN_INT (INTVAL (ix86_compare_op1) + 1); } As an evidence, the following 2-line patch lets the ICE vanish: --- gcc/config/i386/i386.c.orig Wed May 29 17:14:21 2002 +++ gcc/config/i386/i386.c Wed May 29 17:28:45 2002 @@ -7963,6 +7963,8 @@ && (!TARGET_64BIT || GET_MODE (ix86_compare_op0) != DImode || (unsigned int) INTVAL (ix86_compare_op1) != 0x7fffffff) + && (GET_MODE (ix86_compare_op0) != QImode + || (unsigned int) INTVAL (ix86_compare_op1) != 0x7f) && GET_CODE (operands[2]) == CONST_INT && GET_CODE (operands[3]) == CONST_INT) { What's your diagnosis ? -- Eric Botcazou ebotcazou@multimania.com
next reply other threads:[~2002-05-29 16:16 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-05-29 9:16 Eric Botcazou [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-06-02 13:06 Glen Nakamura 2002-06-02 12:36 Richard Henderson 2002-05-30 16:56 rth 2002-05-29 12:16 Richard Henderson 2002-05-29 10:36 Richard Henderson 2002-05-29 9:44 Glen Nakamura 2002-05-29 0:46 Glen Nakamura 2002-05-28 18:16 Glen Nakamura 2002-05-28 17:16 Eric Botcazou 2002-05-28 16:36 Eric Botcazou 2002-05-28 11:00 Richard Henderson 2002-05-28 8:16 Glen Nakamura 2002-05-28 7:10 Glen Nakamura 2002-05-26 16:46 paolo 2002-05-26 12:26 glen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020529161610.31957.qmail@sources.redhat.com \ --to=ebotcazou@libertysurf.fr \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).