public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/48496] [4.7/4.8 Regression] 'asm' operand requires impossible reload
Date: Mon, 09 Apr 2012 08:05:00 -0000	[thread overview]
Message-ID: <bug-48496-4-Z229hGgORH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48496-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #19 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-04-09 08:04:40 UTC ---
> However, recog.c contains in various places checks that will *accept* -during
> reload- a pseudo in places where a memory constraint is required; exactly
> because such pseudos will actually get replaced by a MEM:
> 
>               case TARGET_MEM_CONSTRAINT:
> [snip]
>                 /* During reload, accept a pseudo  */
>                 else if (reload_in_progress && REG_P (op)
>                          && REGNO (op) >= FIRST_PSEUDO_REGISTER)
>                   win = 1;
> 
> Note that those checks were originally added in the same patch that added this
> asm validity check ...

OK, this makes sense.

> So really that validity check shouldn't have failed just because of the
> presence of a spilled pseudo.  The question is, why doesn't this work for the
> ia64 test case as expected?

Because the reload insns are of the form:

(insn 119 66 120 4 (set (reg:DI 136 f8)
        (reg:DI 406 [ MEM[(const mp_limb_t *)mip_6(D) + 8B] ])) pr52657.c:27 5
{movdi_internal}

and the matching alternative would be (f, Q) with

;; Note that while this accepts mem, it only accepts non-volatile mem,
;; and so cannot be "fixed" by adjusting the address.  Thus it cannot
;; and does not use define_memory_constraint.
(define_constraint "Q"
  "Non-volatile memory for FP_REG loads/stores"
  (and (match_operand 0 "memory_operand")
       (match_test "!MEM_VOLATILE_P (op)")))

bool
insn_extra_memory_constraint (enum constraint_num c)
{
  switch (c)
    {
    case CONSTRAINT_S:
      return true;

    default: break;
    }
  return false;
}


  parent reply	other threads:[~2012-04-09  8:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 15:17 [Bug rtl-optimization/48496] New: [4.7 Regression] 'asm' operand requires impossible reload in libffi/src/ia64/ffi.c amonakov at gcc dot gnu.org
2011-04-07 15:40 ` [Bug rtl-optimization/48496] " rguenth at gcc dot gnu.org
2011-04-08 11:26 ` amonakov at gcc dot gnu.org
2011-04-08 21:11 ` pinskia at gcc dot gnu.org
2011-04-09 16:36 ` hjl.tools at gmail dot com
2011-04-11 17:11 ` vmakarov at redhat dot com
2011-06-01 10:58 ` schwab@linux-m68k.org
2011-08-02 14:00 ` rguenth at gcc dot gnu.org
2011-08-03  9:02 ` amonakov at gcc dot gnu.org
2011-12-08  8:59 ` jakub at gcc dot gnu.org
2012-01-10 11:18 ` rguenth at gcc dot gnu.org
2012-01-14 18:14 ` jakub at gcc dot gnu.org
2012-01-19 10:54 ` jakub at gcc dot gnu.org
2012-01-19 11:52 ` jakub at gcc dot gnu.org
2012-03-21 17:46 ` [Bug rtl-optimization/48496] [4.7/4.8 " ebotcazou at gcc dot gnu.org
2012-03-22  8:50 ` rguenth at gcc dot gnu.org
2012-04-05 18:04 ` bugfeed at online dot de
2012-04-06  6:59 ` [Bug rtl-optimization/48496] [4.7/4.8 Regression] 'asm' operand requires impossible reload ebotcazou at gcc dot gnu.org
2012-04-08  7:44 ` ebotcazou at gcc dot gnu.org
2012-04-08 17:33 ` uweigand at gcc dot gnu.org
2012-04-09  8:05 ` ebotcazou at gcc dot gnu.org [this message]
2012-04-09 16:45 ` bugfeed at online dot de
2012-04-10 12:19 ` uweigand at gcc dot gnu.org
2012-04-10 15:31 ` ebotcazou at gcc dot gnu.org
2012-04-11 20:45 ` ebotcazou at gcc dot gnu.org
2012-04-11 20:51 ` [Bug target/48496] " ebotcazou at gcc dot gnu.org
2012-05-04 11:02 ` ebotcazou at gcc dot gnu.org
2012-05-04 11:14 ` ebotcazou at gcc dot gnu.org
2012-05-04 11:23 ` ebotcazou at gcc dot gnu.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=bug-48496-4-Z229hGgORH@http.gcc.gnu.org/bugzilla/ \
    --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).