public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23831] New: ICE in immed_double_const with vectorized multipication
@ 2005-09-12 9:17 uros at kss-loka dot si
2005-09-12 13:51 ` [Bug target/23831] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: uros at kss-loka dot si @ 2005-09-12 9:17 UTC (permalink / raw)
To: gcc-bugs
This testcase ICEs with -O2 -msse2 -ftree-vectorize:
void
test_1 (void)
{
static unsigned int bm[16];
int j;
for (j = 0; j < 16; j++)
bm[j] = bm[j] * 8;
}
prxxx.c: In function 'test_1':
prxxx.c:8: internal compiler error: in immed_double_const, at emit-rtl.c:468
[BTW: This bug was found when dealing with PR target/22480. As a nice
enhancement, this code should actually be transformed into vector left shift by
3.]
--
Summary: ICE in immed_double_const with vectorized multipication
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, ssemmx
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uros at kss-loka dot si
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
@ 2005-09-12 13:51 ` pinskia at gcc dot gnu dot org
2005-09-15 11:53 ` uros at kss-loka dot si
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-12 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-12 13:51 -------
Confirmed, works correctly on powerpc-darwin with about the same IR.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|i686-pc-linux-gnu |
GCC host triplet|i686-pc-linux-gnu |
Known to fail| |4.1.0
Known to work| |4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2005-09-12 13:51:38
date| |
Summary|ICE in immed_double_const |[4.1 Regression] ICE in
|with vectorized |immed_double_const with
|multipication |vectorized multipication
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
2005-09-12 13:51 ` [Bug target/23831] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-15 11:53 ` uros at kss-loka dot si
2005-09-15 14:48 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: uros at kss-loka dot si @ 2005-09-15 11:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uros at kss-loka dot si 2005-09-15 11:53 -------
He problem is in following RTL:
(insn 30 29 31 1 (set (reg:V4SI 75)
(mem/u/i:V4SI (symbol_ref/u:SI ("*.LC0") [flags 0x2]) [3 S16 A128]))
541 {*movv4si_internal} (nil)
(expr_list:REG_EQUAL (const_vector:V4SI [
(const_int 5 [0x5])
(const_int 5 [0x5])
(const_int 5 [0x5])
(const_int 5 [0x5])
])
(nil)))
...
(insn 33 32 34 1 (set (subreg:TI (reg:V4SI 78) 0)
(lshiftrt:TI (subreg:TI (reg:V4SI 75) 0)
(const_int 32 [0x20]))) 709 {sse2_lshrti3} (nil)
(nil))
Somehow a TImode constant is produced, and it triggers the check below:
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
|| GET_MODE_CLASS (mode) == MODE_PARTIAL_INT
/* We can get a 0 for an error mark. */
|| GET_MODE_CLASS (mode) == MODE_VECTOR_INT
|| GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT);
/* We clear out all bits that don't belong in MODE, unless they and
our sign bit are all one. So we get either a reasonable negative
value or a reasonable unsigned value for this mode. */
width = GET_MODE_BITSIZE (mode);
if (width < HOST_BITS_PER_WIDE_INT
&& ((i0 & ((HOST_WIDE_INT) (-1) << (width - 1)))
!= ((HOST_WIDE_INT) (-1) << (width - 1))))
i0 &= ((HOST_WIDE_INT) 1 << width) - 1, i1 = 0;
else if (width == HOST_BITS_PER_WIDE_INT
&& ! (i1 == ~0 && i0 < 0))
i1 = 0;
else
/* We should be able to represent this value as a constant. */
>>> gcc_assert (width <= 2 * HOST_BITS_PER_WIDE_INT);
HOSTS_BITS_PER_WIDE_INT is 32 bit for ia32, and TImode constants are 128 bit
wide. I don't know the correct solution here. If the assert is commented out,
the ICE goes away and produced code works as expected.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
2005-09-12 13:51 ` [Bug target/23831] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-15 11:53 ` uros at kss-loka dot si
@ 2005-09-15 14:48 ` pinskia at gcc dot gnu dot org
2005-09-15 14:54 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-15 14:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-15 14:48 -------
It might be just the time to move x86 over to HWI being 64bit like all other sanse targets, especially
when it uses 128bit constants.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
` (2 preceding siblings ...)
2005-09-15 14:48 ` pinskia at gcc dot gnu dot org
@ 2005-09-15 14:54 ` pinskia at gcc dot gnu dot org
2005-09-26 8:59 ` [Bug middle-end/23831] " uros at kss-loka dot si
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-15 14:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-15 14:54 -------
See PR 14981 for another one which was caused by the same issue before.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
` (3 preceding siblings ...)
2005-09-15 14:54 ` pinskia at gcc dot gnu dot org
@ 2005-09-26 8:59 ` uros at kss-loka dot si
2005-09-26 18:16 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: uros at kss-loka dot si @ 2005-09-26 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uros at kss-loka dot si 2005-09-26 08:59 -------
This is in fact middle-end problem. Patch at http://gcc.gnu.org/ml/gcc-
patches/2005-09/msg01583.html.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |uros at kss-loka dot si
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |09/msg01583.html
Status|NEW |ASSIGNED
Component|target |middle-end
Keywords| |patch
Last reconfirmed|2005-09-12 13:51:38 |2005-09-26 08:59:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
` (4 preceding siblings ...)
2005-09-26 8:59 ` [Bug middle-end/23831] " uros at kss-loka dot si
@ 2005-09-26 18:16 ` cvs-commit at gcc dot gnu dot org
2005-09-26 18:18 ` cvs-commit at gcc dot gnu dot org
2005-09-26 19:55 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-26 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-26 18:16 -------
Subject: Bug 23831
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ian@gcc.gnu.org 2005-09-26 18:16:11
Modified files:
gcc : ChangeLog simplify-rtx.c
Log message:
PR middle-end/23831
* simplify-rtx.c (simplify_immed_subreg) [MODE_INT]: Skip
simplification if elem_bitsize > 2 * HOST_BITS_PER_WIDE_INT.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10024&r2=2.10025
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/simplify-rtx.c.diff?cvsroot=gcc&r1=1.247&r2=1.248
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
` (5 preceding siblings ...)
2005-09-26 18:16 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-26 18:18 ` cvs-commit at gcc dot gnu dot org
2005-09-26 19:55 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-26 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-26 18:18 -------
Subject: Bug 23831
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: ian@gcc.gnu.org 2005-09-26 18:17:54
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/vect: pr23831.c
Log message:
PR middle-end/23831
* gcc.dg/vect/pr23831.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6103&r2=1.6104
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/vect/pr23831.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/23831] [4.1 Regression] ICE in immed_double_const with vectorized multipication
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
` (6 preceding siblings ...)
2005-09-26 18:18 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-26 19:55 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-26 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-26 19:55 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23831
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-09-26 19:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-12 9:17 [Bug target/23831] New: ICE in immed_double_const with vectorized multipication uros at kss-loka dot si
2005-09-12 13:51 ` [Bug target/23831] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-15 11:53 ` uros at kss-loka dot si
2005-09-15 14:48 ` pinskia at gcc dot gnu dot org
2005-09-15 14:54 ` pinskia at gcc dot gnu dot org
2005-09-26 8:59 ` [Bug middle-end/23831] " uros at kss-loka dot si
2005-09-26 18:16 ` cvs-commit at gcc dot gnu dot org
2005-09-26 18:18 ` cvs-commit at gcc dot gnu dot org
2005-09-26 19:55 ` pinskia at gcc dot gnu dot 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).