public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types.
@ 2014-03-11 16:34 graham.stott at btinternet dot com
2014-03-11 17:04 ` [Bug tree-optimization/60502] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: graham.stott at btinternet dot com @ 2014-03-11 16:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
Bug ID: 60502
Summary: 4.9 ICE reassociation and vector types.
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: graham.stott at btinternet dot com
gcc_unreacble abort in reassociation and vector types
If reassocation manages to simplify an expression which involves any VECTOR
type
it will trigger a gcc_unreachable abort.
On any target which has support for vector types.
------------------------------------------------------------
typedef signed char v16i8 __attribute__ ((vector_size(16)));
v16i8 bug1(v16i8 op0)
{
v16i8 m1 = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
return (op0 ^ m1) | (op0 & m1);
}
------------------------------------------------------------
It hits a gcc_unreachable() in build_int_cst_wide.
bug.c:3:7: internal compiler error: in build_int_cst_wide, at tree.c:1200
v16i8 bug1(v16i8 op0)
^
0xb75583 build_int_cst_wide(tree_node*, unsigned long, long)
/gcc/gcc/gcc/tree.c:1200
0xaade63 eliminate_not_pairs
/gcc/gcc/gcc/tree-ssa-reassoc.c:810
0xaade63 optimize_ops_list
/gcc/gcc/gcc/tree-ssa-reassoc.c:1744
0xab0a99 reassociate_bb
/gcc/gcc/gcc/tree-ssa-reassoc.c:4436
0xab08a7 reassociate_bb
/gcc/gcc/gcc/tree-ssa-reassoc.c:4519
0xab311b do_reassoc
/gcc/gcc/gcc/tree-ssa-reassoc.c:4552
0xab311b execute_reassoc
/gcc/gcc/gcc/tree-ssa-reassoc.c:4634
0xab311b execute
/gcc/gcc/gcc/tree-ssa-reassoc.c:4676
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8/4.9 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
@ 2014-03-11 17:04 ` jakub at gcc dot gnu.org
2014-03-11 17:07 ` glisse at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-11 17:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-11
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.8.3
Summary|4.9 ICE reassociation and |[4.8/4.9 Regression] ICE
|vector types. |reassociation and vector
| |types.
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r184923.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8/4.9 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
2014-03-11 17:04 ` [Bug tree-optimization/60502] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
@ 2014-03-11 17:07 ` glisse at gcc dot gnu.org
2014-03-11 17:16 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-03-11 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
Indeed. Probably should call build_all_ones_cst instead of build_low_bits_mask
in eliminate_not_pairs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8/4.9 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
2014-03-11 17:04 ` [Bug tree-optimization/60502] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2014-03-11 17:07 ` glisse at gcc dot gnu.org
@ 2014-03-11 17:16 ` jakub at gcc dot gnu.org
2014-03-11 17:32 ` glisse at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-11 17:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #2)
> Indeed. Probably should call build_all_ones_cst instead of
> build_low_bits_mask in eliminate_not_pairs.
Agreed. Are you going to prepare a patch, or should I? Guess we don't want to
use v16i8 in fn return type or argument, it needs to be
typedef signed char v16i8 __attribute__ ((vector_size (16)));
typedef unsigned char v16u8 __attribute__ ((vector_size (16)));
void
foo (v16i8 *x)
{
v16i8 op0 = *x;
v16i8 m1 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
*x = (op0 ^ m1) | (op0 & m1);
}
void
bar (v16u8 *x)
{
v16u8 op0 = *x;
v16u8 m1 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
*x = (op0 ^ m1) | (op0 & m1);
}
instead.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8/4.9 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (2 preceding siblings ...)
2014-03-11 17:16 ` jakub at gcc dot gnu.org
@ 2014-03-11 17:32 ` glisse at gcc dot gnu.org
2014-03-12 9:22 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-03-11 17:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |glisse at gcc dot gnu.org
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Are you going to prepare a patch, or should I?
Please go ahead (or I'll do it in a few days).
Note that the &m1 part is not necessary to reproduce: *x |= (*x ^ m1);
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8/4.9 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (3 preceding siblings ...)
2014-03-11 17:32 ` glisse at gcc dot gnu.org
@ 2014-03-12 9:22 ` jakub at gcc dot gnu.org
2014-03-12 10:18 ` [Bug tree-optimization/60502] [4.8 " jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-12 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Mar 12 09:21:59 2014
New Revision: 208507
URL: http://gcc.gnu.org/viewcvs?rev=208507&root=gcc&view=rev
Log:
PR tree-optimization/60502
* tree-ssa-reassoc.c (eliminate_not_pairs): Use build_all_ones_cst
instead of build_low_bits_mask.
* gcc.c-torture/compile/pr60502.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr60502.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-reassoc.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (4 preceding siblings ...)
2014-03-12 9:22 ` jakub at gcc dot gnu.org
@ 2014-03-12 10:18 ` jakub at gcc dot gnu.org
2014-04-10 9:36 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-12 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Known to work| |4.9.0
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Summary|[4.8/4.9 Regression] ICE |[4.8 Regression] ICE
|reassociation and vector |reassociation and vector
|types. |types.
Known to fail| |4.8.2
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (5 preceding siblings ...)
2014-03-12 10:18 ` [Bug tree-optimization/60502] [4.8 " jakub at gcc dot gnu.org
@ 2014-04-10 9:36 ` jakub at gcc dot gnu.org
2014-04-10 9:37 ` jakub at gcc dot gnu.org
2014-05-05 8:08 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-10 9:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Apr 10 09:35:39 2014
New Revision: 209274
URL: http://gcc.gnu.org/viewcvs?rev=209274&root=gcc&view=rev
Log:
Backport from mainline
2014-03-12 Jakub Jelinek <jakub@redhat.com>
Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/60502
* tree-ssa-reassoc.c (eliminate_not_pairs): Use build_all_ones_cst
instead of build_low_bits_mask.
* gcc.c-torture/compile/pr60502.c: New test.
2013-06-13 Marc Glisse <marc.glisse@inria.fr>
* tree.c (build_all_ones_cst): New function.
* tree.h (build_all_ones_cst): Declare it.
2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* tree.c (build_minus_one_cst): New function.
* tree.h (build_minus_one_cst): Declare new function.
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-ssa-reassoc.c
branches/gcc-4_8-branch/gcc/tree.c
branches/gcc-4_8-branch/gcc/tree.h
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (6 preceding siblings ...)
2014-04-10 9:36 ` jakub at gcc dot gnu.org
@ 2014-04-10 9:37 ` jakub at gcc dot gnu.org
2014-05-05 8:08 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-10 9:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.8.3
Resolution|--- |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 4.8.3+ too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/60502] [4.8 Regression] ICE reassociation and vector types.
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
` (7 preceding siblings ...)
2014-04-10 9:37 ` jakub at gcc dot gnu.org
@ 2014-05-05 8:08 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-05-05 8:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60502
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon May 5 08:07:35 2014
New Revision: 210062
URL: http://gcc.gnu.org/viewcvs?rev=210062&root=gcc&view=rev
Log:
Backport from mainline
2014-03-12 Jakub Jelinek <jakub@redhat.com>
Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/60502
* tree-ssa-reassoc.c (eliminate_not_pairs): Use build_all_ones_cst
instead of build_low_bits_mask.
* gcc.c-torture/compile/pr60502.c: New test.
2013-06-13 Marc Glisse <marc.glisse@inria.fr>
* tree.c (build_all_ones_cst): New function.
* tree.h (build_all_ones_cst): Declare it.
2013-05-10 Marc Glisse <marc.glisse@inria.fr>
* tree.c (build_minus_one_cst): New function.
* tree.h (build_minus_one_cst): Declare new function.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/compile/pr60502.c
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-05-05 8:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 16:34 [Bug tree-optimization/60502] New: 4.9 ICE reassociation and vector types graham.stott at btinternet dot com
2014-03-11 17:04 ` [Bug tree-optimization/60502] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2014-03-11 17:07 ` glisse at gcc dot gnu.org
2014-03-11 17:16 ` jakub at gcc dot gnu.org
2014-03-11 17:32 ` glisse at gcc dot gnu.org
2014-03-12 9:22 ` jakub at gcc dot gnu.org
2014-03-12 10:18 ` [Bug tree-optimization/60502] [4.8 " jakub at gcc dot gnu.org
2014-04-10 9:36 ` jakub at gcc dot gnu.org
2014-04-10 9:37 ` jakub at gcc dot gnu.org
2014-05-05 8:08 ` jakub at gcc dot gnu.org
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).