From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28324 invoked by alias); 5 Dec 2012 20:46:11 -0000 Received: (qmail 28241 invoked by uid 48); 5 Dec 2012 20:45:44 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88 Date: Wed, 05 Dec 2012 20:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 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-12/txt/msg00494.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597 --- Comment #9 from Uros Bizjak 2012-12-05 20:45:40 UTC --- I think it is better to fixup all sites where equivalent is used: --cut here-- Index: i386.c =================================================================== --- i386.c (revision 194226) +++ i386.c (working copy) @@ -12754,11 +12754,17 @@ ix86_tls_module_base (void) static rtx legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) { + rtx xeq; rtx dest, base, off; rtx pic = NULL_RTX, tp = NULL_RTX; enum machine_mode tp_mode = Pmode; int type; + if (GET_MODE (x) != Pmode) + xeq = gen_rtx_ZERO_EXTEND (Pmode, x); + else + xeq = x; + switch (model) { case TLS_MODEL_GLOBAL_DYNAMIC: @@ -12785,7 +12791,7 @@ legitimize_tls_address (rtx x, enum tls_model mode tp = get_thread_pointer (Pmode, true); dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest)); - set_unique_reg_note (get_last_insn (), REG_EQUAL, x); + set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq); } else { @@ -12802,7 +12808,7 @@ legitimize_tls_address (rtx x, enum tls_model mode end_sequence (); RTL_CONST_CALL_P (insns) = 1; - emit_libcall_block (insns, dest, rax, x); + emit_libcall_block (insns, dest, rax, xeq); } else emit_insn (gen_tls_global_dynamic_32 (dest, x, pic, caddr)); @@ -12871,7 +12877,7 @@ legitimize_tls_address (rtx x, enum tls_model mode { dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, dest, tp)); - set_unique_reg_note (get_last_insn (), REG_EQUAL, x); + set_unique_reg_note (get_last_insn (), REG_EQUAL, xeq); } break; --cut here--