* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
@ 2015-03-02 1:20 ` amodra at gmail dot com
2015-03-02 1:37 ` hubicka at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at gmail dot com @ 2015-03-02 1:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-02
CC| |amodra at gmail dot com,
| |hubicka at gcc dot gnu.org,
| |mliska at suse dot cz
Ever confirmed|0 |1
--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
This is caused by revision 221040
+2015-02-26 Jan Hubicka <hubicka@ucw.cz>
+ Martin Liska <mliska@suse.cz>
+
+ PR bootstrap/65150
[snip]
#2 0x0000000000bca3fa in _fatal_insn_not_found
(insn=insn@entry=0x7ffff6ae4ca8, file=file@entry=0x13852e0
"/src/gcc-current/gcc/config/rs6000/rs6000.md", line=line@entry=7813,
function=function@entry=0x139c330 <insn_min_length(rtx_insn*)::__FUNCTION__>
"insn_min_length") at /src/gcc-current/gcc/rtl-error.c:118
#3 0x0000000000f1e9f2 in insn_min_length (insn=insn@entry=0x7ffff6ae4ca8) at
/src/gcc-current/gcc/config/rs6000/rs6000.md:7813
#4 0x000000000095c8e2 in shorten_branches (first=0x7ffff6ad8038) at
/src/gcc-current/gcc/final.c:1221
#5 0x0000000000eea239 in rs6000_output_mi_thunk (file=0x1c37950,
thunk_fndecl=<optimised out>, delta=<optimised out>, vcall_offset=<optimised
out>, function=<optimised out>) at
/src/gcc-current/gcc/config/rs6000/rs6000.c:25835
That's here:
/* Run just enough of rest_of_compilation to get the insns emitted.
There's not really enough bulk here to make other passes such as
instruction scheduling worth while. Note that use_thunk calls
assemble_start_function and assemble_end_function. */
insn = get_insns ();
shorten_branches (insn);
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
2015-03-02 1:20 ` [Bug target/65263] " amodra at gmail dot com
@ 2015-03-02 1:37 ` hubicka at gcc dot gnu.org
2015-03-02 1:56 ` hubicka at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02 1:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Hmm, this seems interesting. The revision enabled more merging in ICF. The
expansion dies in output MI thunk that is not ICF produced thunk. So only
conclussion I can think of is that ICF redirected call in thunk that made the
target dependent code go wrong.
What is wrong about the insn? Does the declaration of functions differ
significantly?
Let me see if I can reproduce that in a cross.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
2015-03-02 1:20 ` [Bug target/65263] " amodra at gmail dot com
2015-03-02 1:37 ` hubicka at gcc dot gnu.org
@ 2015-03-02 1:56 ` hubicka at gcc dot gnu.org
2015-03-02 3:05 ` amodra at gmail dot com
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02 1:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Semantic equality hit:bool VirtualMatrice<R>::m_fn1(int) const [with R =
int]->virtual bool C<int>::m_fn1(int) const
Assembler symbol names:_ZNK14VirtualMatriceIiE5m_fn1Ei->_ZNK1CIiE5m_fn1Ei
Wrapper cannot be created because of COMDAT
1 local calls have been redirected.
Unified; Function body was removed.
I assume the problem is that thunk can not be generated to non-local symbol. I
specifically prevent comdat local symbols to be produced because these makes
inlining harder.
There are couple options. First would be to punt redirection on thunks calls,
second would be to produce local alias for thunk calls. I.e. check
TARGET_USE_LOCAL_THUNK_ALIAS_P and produce the local alias specifically for
thunks. Third would be to produce the local alias always.
I guess first is safest - while I plan to turn thunks to use noninterposable
alias path, I did not because I fear undocumented target issues. Bettter to
not start with these in stage4.
I will prepare patch after dinner
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (2 preceding siblings ...)
2015-03-02 1:56 ` hubicka at gcc dot gnu.org
@ 2015-03-02 3:05 ` amodra at gmail dot com
2015-03-02 7:07 ` hubicka at ucw dot cz
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at gmail dot com @ 2015-03-02 3:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #4 from Alan Modra <amodra at gmail dot com> ---
> I assume the problem is that thunk can not be generated to non-local symbol.
Yes, that is at the root of this problem. The thunk can't be allowed to jump
to anything outside the current object file.
The pattern is a sibcall_local64 except that the symbol_ref doesn't match
rs6000/predicates.md: current_file_function_operand.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (3 preceding siblings ...)
2015-03-02 3:05 ` amodra at gmail dot com
@ 2015-03-02 7:07 ` hubicka at ucw dot cz
2015-03-02 8:33 ` amodra at gmail dot com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hubicka at ucw dot cz @ 2015-03-02 7:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
the following (untested) patch should prevent redirection to happen.
Index: ipa-icf.c
===================================================================
--- ipa-icf.c (revision 221096)
+++ ipa-icf.c (working copy)
@@ -697,12 +697,22 @@ redirect_all_callers (cgraph_node *n, cg
{
int nredirected = 0;
ipa_ref *ref;
+ cgraph_edge *e = n->callers;
- while (n->callers)
+ while (e)
{
- cgraph_edge *e = n->callers;
- e->redirect_callee (to);
- nredirected++;
+ /* Redirecting thunks to interposable symbols or symbols in other
sections
+ may not be supported by target output code. Play safe for now and
+ punt on redirection. */
+ if (!e->caller->thunk.thunk_p)
+ {
+ struct cgraph_edge *nexte = e->next_callee;
+ e->redirect_callee (to);
+ e = nexte;
+ nredirected++;
+ }
+ else
+ e = e->next_callee;
}
for (unsigned i = 0; n->iterate_direct_aliases (i, ref);)
{
@@ -726,6 +736,17 @@ redirect_all_callers (cgraph_node *n, cg
return nredirected;
}
+/* Return true if NODE has thunk. */
+
+bool
+has_thunk_p (cgraph_node *node, void *)
+{
+ for (cgraph_edge *e = node->callers; e; e = e->next_caller)
+ if (e->caller->thunk.thunk_p)
+ return true;
+ return false;
+}
+
/* Merges instance with an ALIAS_ITEM, where alias, thunk or redirection can
be applied. */
@@ -907,6 +928,7 @@ sem_function::merge (sem_item *alias_ite
return false;
}
if (!create_wrapper
+ && !alias->call_for_symbol_and_aliases (has_thunk_p, NULL, true)
&& !alias->can_remove_if_no_direct_calls_p ())
{
if (dump_file)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (4 preceding siblings ...)
2015-03-02 7:07 ` hubicka at ucw dot cz
@ 2015-03-02 8:33 ` amodra at gmail dot com
2015-03-02 9:00 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: amodra at gmail dot com @ 2015-03-02 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #6 from Alan Modra <amodra at gmail dot com> ---
rev 221098 plus the patch segfaults on the testcase in
cgraph_node::function_symbol. node->callees is NULL.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (5 preceding siblings ...)
2015-03-02 8:33 ` amodra at gmail dot com
@ 2015-03-02 9:00 ` rguenth at gcc dot gnu.org
2015-03-02 13:41 ` marxin at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-02 9:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (6 preceding siblings ...)
2015-03-02 9:00 ` rguenth at gcc dot gnu.org
@ 2015-03-02 13:41 ` marxin at gcc dot gnu.org
2015-03-02 22:50 ` ppluzhnikov at google dot com
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2015-03-02 13:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 34922
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34922&action=edit
Suggested patch
There's fixed version of the patch:
1) If I see correctly, there was error in: struct cgraph_edge *nexte =
e->next_callee
2) We should not remove alias if there's a thunk that wasn't redirected
3) gcc_assert must be changed for these cases
Patch can run the testcase and survives FF with -O3 and -flto. Regression tests
have been running.
Martin
>From gcc-bugs-return-478990-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 02 13:44:34 2015
Return-Path: <gcc-bugs-return-478990-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27557 invoked by alias); 2 Mar 2015 13:44:34 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27488 invoked by uid 48); 2 Mar 2015 13:44:30 -0000
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/65006] [5 Regression] 252.eon in SPEC CPU 2000 miscompiled with LTO
Date: Mon, 02 Mar 2015 13:44:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hjl.tools at gmail dot com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-65006-4-u3K2pL6yWO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65006-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65006-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg00134.txt.bz2
Content-length: 429
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide006
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed as of r221077.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (7 preceding siblings ...)
2015-03-02 13:41 ` marxin at gcc dot gnu.org
@ 2015-03-02 22:50 ` ppluzhnikov at google dot com
2015-03-02 23:12 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ppluzhnikov at google dot com @ 2015-03-02 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
--- Comment #8 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
r221040 is also possibly causing:
../sysdeps/gnu/siglist.c:77:1: internal compiler error: in address_matters_p,
at symtab.c:1908
when building trunk GLIBC (seen with GCC @r221125; same source builds with GCC
@r220312).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (8 preceding siblings ...)
2015-03-02 22:50 ` ppluzhnikov at google dot com
@ 2015-03-02 23:12 ` hubicka at gcc dot gnu.org
2015-03-02 23:33 ` ppluzhnikov at google dot com
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-02 23:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Paul, I fixed similar bug yesterday, so please check if it works now for you
and if not, please make new PR with a preprocessed source.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (9 preceding siblings ...)
2015-03-02 23:12 ` hubicka at gcc dot gnu.org
@ 2015-03-02 23:33 ` ppluzhnikov at google dot com
2015-03-03 3:10 ` amodra at gmail dot com
2015-03-03 16:04 ` aldyh at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: ppluzhnikov at google dot com @ 2015-03-02 23:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #10 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
(In reply to Jan Hubicka from comment #9)
> Paul, I fixed similar bug yesterday, so please check if it works now
I just built at current SVN trunk (r221126).
Filed PR 65287
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (10 preceding siblings ...)
2015-03-02 23:33 ` ppluzhnikov at google dot com
@ 2015-03-03 3:10 ` amodra at gmail dot com
2015-03-03 16:04 ` aldyh at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: amodra at gmail dot com @ 2015-03-03 3:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #11 from Alan Modra <amodra at gmail dot com> ---
Martin, your patch passes bootstrap and regression testing on powerpc64-linux.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/65263] [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu
2015-03-01 12:44 [Bug target/65263] New: [5 Regression] ICE (error: unrecognizable insn / in insn_min_length, at config/rs6000/rs6000.md) on powerpc64le-linux-gnu doko at gcc dot gnu.org
` (11 preceding siblings ...)
2015-03-03 3:10 ` amodra at gmail dot com
@ 2015-03-03 16:04 ` aldyh at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: aldyh at gcc dot gnu.org @ 2015-03-03 16:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #14 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
*** Bug 65278 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread