This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Dec 2012 20:45:40 +0000
- Subject: [Bug middle-end/55597] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88
- Auto-submitted: auto-generated
- References: <bug-55597-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597
--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 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--