public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
@ 2011-07-03 19:51 doko at ubuntu dot com
2011-07-04 9:35 ` [Bug target/49621] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: doko at ubuntu dot com @ 2011-07-03 19:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Summary: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at
explow.c:57
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: doko@ubuntu.com
[forwarded from http://bugs.debian.org/632510]
works with 4.4.6, fails with recent 4.5 and 4.6 branches and trunk
(powerpc-linux)
$ gcc -c -O -maltivec -g foo.i
foo.i: In function 'foo':
foo.i:17:1: internal compiler error: in trunc_int_for_mode, at explow.c:56
Please submit a full bug report,
with preprocessed source if appropriate.
int foo(void)
{
__attribute__((altivec(vector__))) unsigned a, b, c;
unsigned k = 1;
a = (__attribute__((altivec(vector__))) unsigned) { 0, 0, 0, 1 };
b = c = (__attribute__((altivec(vector__))) unsigned) { 0, 0, 0, 0 };
a = __builtin_vec_add(a, __builtin_vec_splats(k));
b = __builtin_vec_add(b, a);
c = __builtin_vec_sel(c, a, b);
if (__builtin_vec_vcmpeq_p(1, b, c))
return 1;
return 0;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
@ 2011-07-04 9:35 ` rguenth at gcc dot gnu.org
2011-07-07 12:05 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-04 9:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.5.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
2011-07-04 9:35 ` [Bug target/49621] " rguenth at gcc dot gnu.org
@ 2011-07-07 12:05 ` jakub at gcc dot gnu.org
2011-07-07 12:08 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-07 12:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.07 12:03:50
CC| |dje at gcc dot gnu.org,
| |jakub at gcc dot gnu.org,
| |meissner at gcc dot gnu.org
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
2011-07-04 9:35 ` [Bug target/49621] " rguenth at gcc dot gnu.org
2011-07-07 12:05 ` jakub at gcc dot gnu.org
@ 2011-07-07 12:08 ` jakub at gcc dot gnu.org
2011-07-08 20:12 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-07 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-07 12:07:10 UTC ---
Created attachment 24706
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24706
gcc47-pr49621.patch
I believe the bug is in the ppc vector select patterns, comparing a vector mode
reg with const0_rtx in a NE is bound to confuse the middle-end. Both operands
of a comparison should always have either the same mode, or one should be
VOIDmode and the other should have integer or CC mode.
The following patch fixes this, completely untested so far.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
` (2 preceding siblings ...)
2011-07-07 12:08 ` jakub at gcc dot gnu.org
@ 2011-07-08 20:12 ` jakub at gcc dot gnu.org
2011-07-08 20:17 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-08 20:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-08 20:10:22 UTC ---
Author: jakub
Date: Fri Jul 8 20:10:18 2011
New Revision: 176064
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176064
Log:
PR target/49621
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use
CONST0_RTX (dest_mode) instead of const0_rtx as second operand
of NE.
* config/rs6000/vector.md (vector_select_<mode>,
vector_select_<mode>_uns): Change second operand of NE to
CONST0_RTX (<MODE>mode) instead of const0_rtx.
* config/rs6000/altivec.md (*altivec_vsel<mode>,
*altivec_vsel<mode>_uns): Expect second operand of NE to be
zero_constant of the corresponding vector mode.
* config/rs6000/vsx.md (*vsx_xxsel<mode>, *vsx_xxsel<mode>_uns):
Likewise.
* gcc.target/powerpc/altivec-34.c: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.target/powerpc/altivec-34.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/rs6000/altivec.md
branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_6-branch/gcc/config/rs6000/vector.md
branches/gcc-4_6-branch/gcc/config/rs6000/vsx.md
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
` (3 preceding siblings ...)
2011-07-08 20:12 ` jakub at gcc dot gnu.org
@ 2011-07-08 20:17 ` jakub at gcc dot gnu.org
2011-07-08 20:19 ` [Bug target/49621] [4.5 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-08 20:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-08 20:10:16 UTC ---
Author: jakub
Date: Fri Jul 8 20:09:58 2011
New Revision: 176063
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176063
Log:
PR target/49621
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use
CONST0_RTX (dest_mode) instead of const0_rtx as second operand
of NE.
* config/rs6000/vector.md (vector_select_<mode>,
vector_select_<mode>_uns): Change second operand of NE to
CONST0_RTX (<MODE>mode) instead of const0_rtx.
* config/rs6000/altivec.md (*altivec_vsel<mode>,
*altivec_vsel<mode>_uns): Expect second operand of NE to be
zero_constant of the corresponding vector mode.
* config/rs6000/vsx.md (*vsx_xxsel<mode>, *vsx_xxsel<mode>_uns):
Likewise.
* gcc.target/powerpc/altivec-34.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/powerpc/altivec-34.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/altivec.md
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/vector.md
trunk/gcc/config/rs6000/vsx.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
` (4 preceding siblings ...)
2011-07-08 20:17 ` jakub at gcc dot gnu.org
@ 2011-07-08 20:19 ` jakub at gcc dot gnu.org
2011-07-19 13:13 ` jakub at gcc dot gnu.org
2011-07-19 13:50 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-08 20:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.5/4.6/4.7 regression] |[4.5 regression] ICE in
|ICE in trunc_int_for_mode, |trunc_int_for_mode, at
|at explow.c:57 |explow.c:57
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-08 20:18:30 UTC ---
Fixed for 4.6+ so far.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
` (5 preceding siblings ...)
2011-07-08 20:19 ` [Bug target/49621] [4.5 " jakub at gcc dot gnu.org
@ 2011-07-19 13:13 ` jakub at gcc dot gnu.org
2011-07-19 13:50 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-19 13:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-19 13:09:51 UTC ---
Author: jakub
Date: Tue Jul 19 13:09:48 2011
New Revision: 176458
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176458
Log:
Backport from mainline
2011-07-08 Jakub Jelinek <jakub@redhat.com>
PR target/49621
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use
CONST0_RTX (dest_mode) instead of const0_rtx as second operand
of NE.
* config/rs6000/vector.md (vector_select_<mode>,
vector_select_<mode>_uns): Change second operand of NE to
CONST0_RTX (<MODE>mode) instead of const0_rtx.
* config/rs6000/altivec.md (*altivec_vsel<mode>,
*altivec_vsel<mode>_uns): Expect second operand of NE to be
zero_constant of the corresponding vector mode.
* config/rs6000/vsx.md (*vsx_xxsel<mode>, *vsx_xxsel<mode>_uns):
Likewise.
* gcc.target/powerpc/altivec-34.c: New test.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/powerpc/altivec-34.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/rs6000/altivec.md
branches/gcc-4_5-branch/gcc/config/rs6000/rs6000.c
branches/gcc-4_5-branch/gcc/config/rs6000/vector.md
branches/gcc-4_5-branch/gcc/config/rs6000/vsx.md
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/49621] [4.5 regression] ICE in trunc_int_for_mode, at explow.c:57
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
` (6 preceding siblings ...)
2011-07-19 13:13 ` jakub at gcc dot gnu.org
@ 2011-07-19 13:50 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-07-19 13:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49621
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-19 13:47:34 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-07-19 13:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-03 19:51 [Bug target/49621] New: [4.5/4.6/4.7 regression] ICE in trunc_int_for_mode, at explow.c:57 doko at ubuntu dot com
2011-07-04 9:35 ` [Bug target/49621] " rguenth at gcc dot gnu.org
2011-07-07 12:05 ` jakub at gcc dot gnu.org
2011-07-07 12:08 ` jakub at gcc dot gnu.org
2011-07-08 20:12 ` jakub at gcc dot gnu.org
2011-07-08 20:17 ` jakub at gcc dot gnu.org
2011-07-08 20:19 ` [Bug target/49621] [4.5 " jakub at gcc dot gnu.org
2011-07-19 13:13 ` jakub at gcc dot gnu.org
2011-07-19 13:50 ` 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).