From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6115 invoked by alias); 9 Apr 2012 08:05:49 -0000 Received: (qmail 6100 invoked by uid 22791); 9 Apr 2012 08:05:48 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Apr 2012 08:05:34 +0000 From: "ebotcazou at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: major X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.1 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg00531.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48496 --- Comment #19 from Eric Botcazou 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; }