public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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: Thu, 06 Dec 2012 20:14:00 -0000 [thread overview]
Message-ID: <bug-55597-4-1bOnWE0KOe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55597-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55597
--- Comment #12 from Uros Bizjak <ubizjak at gmail dot com> 2012-12-06 20:14:06 UTC ---
(In reply to comment #11)
> It works. Thanks.
>
> Unfortunately it creates GC garbage often unnecessary, when it won't be used at
> all.
I agree. Let's keep zext together with their users:
--cut here--
Index: i386.c
===================================================================
--- i386.c (revision 194263)
+++ i386.c (working copy)
@@ -12785,6 +12785,9 @@
tp = get_thread_pointer (Pmode, true);
dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest));
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
}
else
@@ -12793,15 +12796,20 @@
if (TARGET_64BIT)
{
- rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
+ rtx rax = gen_rtx_REG (Pmode, AX_REG);
+ rtx insns;
start_sequence ();
- emit_call_insn (ix86_gen_tls_global_dynamic_64 (rax, x,
- caddr));
+ emit_call_insn
+ (ix86_gen_tls_global_dynamic_64 (rax, x, caddr));
insns = get_insns ();
end_sequence ();
RTL_CONST_CALL_P (insns) = 1;
+
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
emit_libcall_block (insns, dest, rax, x);
}
else
@@ -12842,11 +12850,12 @@
if (TARGET_64BIT)
{
- rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
+ rtx rax = gen_rtx_REG (Pmode, AX_REG);
+ rtx insns, eqv;
start_sequence ();
- emit_call_insn (ix86_gen_tls_local_dynamic_base_64 (rax,
- caddr));
+ emit_call_insn
+ (ix86_gen_tls_local_dynamic_base_64 (rax, caddr));
insns = get_insns ();
end_sequence ();
@@ -12871,6 +12880,9 @@
{
dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, dest, tp));
+ if (GET_MODE (x) != Pmode)
+ x = gen_rtx_ZERO_EXTEND (Pmode, x);
+
set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
}
break;
--cut here--
next prev parent reply other threads:[~2012-12-06 20:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 21:01 [Bug middle-end/55597] New: " hjl.tools at gmail dot com
2012-12-04 22:29 ` [Bug middle-end/55597] " hjl.tools at gmail dot com
2012-12-04 22:52 ` bonzini at gnu dot org
2012-12-04 23:25 ` [Bug target/55597] " steven at gcc dot gnu.org
2012-12-04 23:46 ` [Bug target/55597] " steven at gcc dot gnu.org
2012-12-04 23:50 ` [Bug middle-end/55597] " hjl.tools at gmail dot com
2012-12-05 11:34 ` [Bug middle-end/55597] [4.8 Regression] " ebotcazou at gcc dot gnu.org
2012-12-05 17:28 ` hjl.tools at gmail dot com
2012-12-05 17:56 ` hjl.tools at gmail dot com
2012-12-05 20:46 ` ubizjak at gmail dot com
2012-12-06 0:22 ` hjl.tools at gmail dot com
2012-12-06 15:05 ` jakub at gcc dot gnu.org
2012-12-06 20:14 ` ubizjak at gmail dot com [this message]
2012-12-06 22:05 ` uros at gcc dot gnu.org
2012-12-07 3:44 ` hjl.tools at gmail dot com
2012-12-07 8:11 ` uros at gcc dot gnu.org
2012-12-07 8:21 ` ubizjak at gmail dot com
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-55597-4-1bOnWE0KOe@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).