public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
@ 2011-12-27 11:04 ubizjak at gmail dot com
2011-12-27 11:52 ` [Bug target/51681] " ubizjak at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-27 11:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Bug #: 51681
Summary: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c
on ia64
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ubizjak@gmail.com
Target: ia64
Also crashes in crosscompiler:
~/gcc-build-xxx/gcc/cc1 -O2 -quiet vshuf-v2si.c
In file included from vshuf-v2si.c:17:0:
vshuf-main.inc: In function ‘test_12’:
vshuf-main.inc:28:1: internal compiler error: in expand_vec_perm_shrp, at
config/ia64/ia64.c:11107
Please submit a full bug report,
[...]
Breakpoint 2, internal_error (gmsgid=0xd8d205 "in %s, at %s:%d") at
../../gcc-svn/trunk/gcc/diagnostic.c:839
839 {
(gdb) bt
#0 internal_error (gmsgid=0xd8d205 "in %s, at %s:%d") at
../../gcc-svn/trunk/gcc/diagnostic.c:839
#1 0x0000000000bd4f64 in fancy_abort (file=<optimized out>, line=11107,
function=0xce6410 "expand_vec_perm_shrp")
at ../../gcc-svn/trunk/gcc/diagnostic.c:899
#2 0x0000000000a71885 in expand_vec_perm_shrp (d=0x7fffffffd100) at
../../gcc-svn/trunk/gcc/config/ia64/ia64.c:11107
#3 expand_vec_perm_1 (d=0x7fffffffd100) at
../../gcc-svn/trunk/gcc/config/ia64/ia64.c:11164
#4 0x0000000000a718bd in ia64_expand_vec_perm_const_1 (d=0x7fffffffd100) at
../../gcc-svn/trunk/gcc/config/ia64/ia64.c:11390
#5 0x0000000000a7af58 in ia64_expand_vec_perm_const (operands=<optimized out>)
at ../../gcc-svn/trunk/gcc/config/ia64/ia64.c:11467
#6 0x0000000000a9af44 in gen_vec_perm_constv2si (operand0=0x7ffff11ff320,
operand1=0x7ffff11ff0e0, operand2=0x7ffff11ff340,
operand3=0x7ffff1546d80) at
../../gcc-svn/trunk/gcc/config/ia64/vect.md:1601
#7 0x00000000007a1119 in maybe_expand_insn (icode=<optimized out>,
nops=<optimized out>, ops=<optimized out>)
at ../../gcc-svn/trunk/gcc/optabs.c:8301
#8 0x00000000007a15fa in expand_vec_perm_1 (icode=CODE_FOR_vec_perm_constv2si,
target=<optimized out>, v0=0x7ffff11ff0e0, v1=0x7ffff11fa9c0,
sel=<optimized out>) at ../../gcc-svn/trunk/gcc/optabs.c:6874
#9 0x00000000007a8052 in expand_vec_perm (mode=V2SImode, v0=0x7ffff11ff0e0,
v1=0x7ffff11fa9c0, sel=0x7ffff1546d80, target=0x7ffff11fa978)
at ../../gcc-svn/trunk/gcc/optabs.c:6915
(gdb) frame 2
#2 0x0000000000a71885 in expand_vec_perm_shrp (d=0x7fffffffd100) at
../../gcc-svn/trunk/gcc/config/ia64/ia64.c:11107
11107 gcc_assert (IN_RANGE (shift, 1, 63));
(gdb) p shift
$1 = 96
(gdb) p d->perm[0]
$2 = 3 '\003'
(gdb) p debug_rtx (d->op0)
(reg:V2SI 340 [ a.22 ])
$3 = void
(gdb) p debug_rtx (d->op1)
(reg:V2SI 358)
$4 = void
Probably some adjustment to shift is missing when selecting second operand.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
@ 2011-12-27 11:52 ` ubizjak at gmail dot com
2011-12-29 9:00 ` ubizjak at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-27 11:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-27 11:39:00 UTC ---
Maybe related:
FAIL: gcc.dg/torture/vshuf-v8qi.c -O2 execution test
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
2011-12-27 11:52 ` [Bug target/51681] " ubizjak at gmail dot com
@ 2011-12-29 9:00 ` ubizjak at gmail dot com
2012-01-02 12:29 ` ubizjak at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-29 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-29
Target Milestone|--- |4.7.0
Ever Confirmed|0 |1
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-29 08:12:42 UTC ---
Confirmed [1].
[1] http://gcc.gnu.org/ml/gcc-testresults/2011-12/msg02739.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
2011-12-27 11:52 ` [Bug target/51681] " ubizjak at gmail dot com
2011-12-29 9:00 ` ubizjak at gmail dot com
@ 2012-01-02 12:29 ` ubizjak at gmail dot com
2012-01-02 12:31 ` ubizjak at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-02 12:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |ubizjak at gmail dot com
|gnu.org |
--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-02 12:29:05 UTC ---
I am testing patches for both issues.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (2 preceding siblings ...)
2012-01-02 12:29 ` ubizjak at gmail dot com
@ 2012-01-02 12:31 ` ubizjak at gmail dot com
2012-01-02 12:35 ` ubizjak at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-02 12:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-02 12:31:24 UTC ---
(In reply to comment #1)
> FAIL: gcc.dg/torture/vshuf-v8qi.c -O2 execution test
It is not related to original failure; following patchlet fixes the failure:
--cut here--
@@ -11207,7 +11210,7 @@ expand_vec_perm_broadcast (struct expand_vec_perm_
elt *= BITS_PER_UNIT;
temp = gen_reg_rtx (DImode);
emit_insn (gen_extzv (temp, gen_lowpart (DImode, d->op0),
- GEN_INT (elt), GEN_INT (8)));
+ GEN_INT (8), GEN_INT (elt)));
emit_insn (gen_mux1_brcst_qi (d->target, gen_lowpart (QImode, temp)));
break;
--cut here--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (3 preceding siblings ...)
2012-01-02 12:31 ` ubizjak at gmail dot com
@ 2012-01-02 12:35 ` ubizjak at gmail dot com
2012-01-02 19:49 ` ubizjak at gmail dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-02 12:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-02 12:35:25 UTC ---
Patch:
--cut here--
Index: ia64.c
===================================================================
--- ia64.c (revision 182780)
+++ ia64.c (working copy)
@@ -11085,7 +11085,7 @@ static bool
expand_vec_perm_shrp (struct expand_vec_perm_d *d)
{
unsigned i, nelt = d->nelt, shift, mask;
- rtx tmp, op0, op1;;
+ rtx tmp, hi, lo;
/* ??? Don't force V2SFmode into the integer registers. */
if (d->vmode == V2SFmode)
@@ -11101,6 +11101,11 @@ expand_vec_perm_shrp (struct expand_vec_perm_d *d)
if (d->testing_p)
return true;
+ hi = shift < nelt ? d->op1 : d->op0;
+ lo = shift < nelt ? d->op0 : d->op1;
+
+ shift %= nelt;
+
shift *= GET_MODE_UNIT_SIZE (d->vmode) * BITS_PER_UNIT;
/* We've eliminated the shift 0 case via expand_vec_perm_identity. */
@@ -11113,11 +11118,9 @@ expand_vec_perm_shrp (struct expand_vec_perm_d *d)
shift = 64 - shift;
tmp = gen_reg_rtx (DImode);
- op0 = (shift < nelt ? d->op0 : d->op1);
- op1 = (shift < nelt ? d->op1 : d->op0);
- op0 = gen_lowpart (DImode, op0);
- op1 = gen_lowpart (DImode, op1);
- emit_insn (gen_shrp (tmp, op0, op1, GEN_INT (shift)));
+ hi = gen_lowpart (DImode, hi);
+ lo = gen_lowpart (DImode, lo);
+ emit_insn (gen_shrp (tmp, hi, lo, GEN_INT (shift)));
emit_move_insn (d->target, gen_lowpart (d->vmode, tmp));
return true;
--cut here--
Just a bunch of mix-ups; where high/low part goes, shift value is not adjusted
after operand swap, and shift value is compared in *bits* to number of
elements.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (4 preceding siblings ...)
2012-01-02 12:35 ` ubizjak at gmail dot com
@ 2012-01-02 19:49 ` ubizjak at gmail dot com
2012-01-03 16:53 ` ubizjak at gmail dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-02 19:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-01/msg00077.htm
| |l
--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-02 19:48:52 UTC ---
Patch at [1].
[1] http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00077.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (5 preceding siblings ...)
2012-01-02 19:49 ` ubizjak at gmail dot com
@ 2012-01-03 16:53 ` ubizjak at gmail dot com
2012-01-05 21:50 ` uros at gcc dot gnu.org
2012-01-05 21:51 ` ubizjak at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-03 16:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |51743
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-03 16:53:36 UTC ---
Patch is not correct for -mbig-endian, but currently many vshuf tests FAIL with
-O2 -mbig-endian, so I'm not able to properly analyze/fix it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (6 preceding siblings ...)
2012-01-03 16:53 ` ubizjak at gmail dot com
@ 2012-01-05 21:50 ` uros at gcc dot gnu.org
2012-01-05 21:51 ` ubizjak at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu.org @ 2012-01-05 21:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
--- Comment #8 from uros at gcc dot gnu.org 2012-01-05 21:50:25 UTC ---
Author: uros
Date: Thu Jan 5 21:50:20 2012
New Revision: 182931
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182931
Log:
PR target/51681
* config/ia64/ia64.c (expand_vec_perm_shrp): Use correct operands
for shrp pattern. Correctly handle and fixup shift variable.
Return false when shift > nelt for BYTES_BIG_ENDIAN target.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/ia64/ia64.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/51681] [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
` (7 preceding siblings ...)
2012-01-05 21:50 ` uros at gcc dot gnu.org
@ 2012-01-05 21:51 ` ubizjak at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-05 21:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51681
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-05 21:51:37 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-01-05 21:51 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-27 11:04 [Bug target/51681] New: [4.7 Regression]: ICE in gcc.dg/torture/vshuf-v2si.c on ia64 ubizjak at gmail dot com
2011-12-27 11:52 ` [Bug target/51681] " ubizjak at gmail dot com
2011-12-29 9:00 ` ubizjak at gmail dot com
2012-01-02 12:29 ` ubizjak at gmail dot com
2012-01-02 12:31 ` ubizjak at gmail dot com
2012-01-02 12:35 ` ubizjak at gmail dot com
2012-01-02 19:49 ` ubizjak at gmail dot com
2012-01-03 16:53 ` ubizjak at gmail dot com
2012-01-05 21:50 ` uros at gcc dot gnu.org
2012-01-05 21:51 ` ubizjak at gmail dot com
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).