public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fjahanian at apple dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/15825] New: if-cvt optimisation patch noce_try_sign_mask breaks apple-ppc-darwin port
Date: Fri, 04 Jun 2004 17:47:00 -0000	[thread overview]
Message-ID: <20040604174733.15825.fjahanian@apple.com> (raw)

Following patch breaks gcc bootstrap on apple-ppc-darwin. A small test case is attached. Note
that it may not ICE on the FSF mainlline. But it ICEd on a locally built compiler with local
patches. I have also attached the pattern which when presented to noce_try_sign_mask causes
the illegal instruction.

2004-03-09  Roger Sayle  <roger@eyesopen.com>
            Andrew Pinski  <pinskia@physics.uc.edu>

        * ifcvt.c (noce_try_sign_mask): New function to transform
        "x = (y < 0) ? z : 0" into the equivalent "x = (y >> C) & z".
        (noce_process_if_block): Call noce_try_sign_mask.

unsigned int
real_from_integer (long long high, int unsigned_p)
{
      return high < 0 &&  !unsigned_p;
}

/Volumes/sandbox/apple-ppc-lno-merge.bootstrap/gcc/stage1/xgcc -B /Volumes/sandbox/
apple-ppc-lno-merge.bootstrap/gcc/stage1 -O2 -c bad.c
bad.c: In function `real_from_integer':
bad.c:5: error: unrecognizable insn:
(insn:HI 67 66 68 0 (set (reg:SI 132)
        (eq:SI (reg/v:SI 121 [ unsigned_p ])
            (const_int 0 [0x0]))) -1 (nil)
    (expr_list:REG_DEAD (reg/v:SI 121 [ unsigned_p ])
        (nil)))
bad.c:5: internal compiler error: in extract_insn, at recog.c:2068
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

The patter which causes this is:

(insn 61 60 32 2 (parallel [
            (set (reg:SI 118 [ iftmp.0 ])
                (eq:SI (reg/v:SI 121 [ unsigned_p ])
                    (const_int 0 [0x0])))
            (clobber (scratch:SI))
        ]) 413 {*rs6000.md:11584} (nil)
    (expr_list:REG_DEAD (reg/v:SI 121 [ unsigned_p ])
        (expr_list:REG_UNUSED (scratch:SI)
            (nil))))

-- 
           Summary: if-cvt optimisation patch noce_try_sign_mask breaks
                    apple-ppc-darwin port
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fjahanian at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15825


             reply	other threads:[~2004-06-04 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 17:47 fjahanian at apple dot com [this message]
2004-06-04 18:02 ` [Bug middle-end/15825] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-04 19:48 ` pinskia at gcc dot gnu dot org
2004-06-04 20:04 ` pinskia at gcc dot gnu dot org
2004-06-04 20:27 ` pinskia at gcc dot gnu dot org
2004-06-07 16:14 ` pinskia at gcc dot gnu dot org
2004-06-25 18:40 ` cvs-commit at gcc dot gnu dot org
2004-06-25 18:53 ` pinskia at gcc dot gnu dot org

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=20040604174733.15825.fjahanian@apple.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).