Bug 24951 - [4.1/4.2 Regression] ICE: RTL check: expected code 'const_int', have 'const_double' in output_vec_const_move, at config/rs6000/rs6000.c
Summary: [4.1/4.2 Regression] ICE: RTL check: expected code 'const_int', have 'const_d...
Status: VERIFIED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.0
Assignee: Paolo Bonzini
URL:
Keywords: ice-checking, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-11-20 09:17 UTC by Andreas Jaeger
Modified: 2005-11-22 16:10 UTC (History)
3 users (show)

See Also:
Host: powerpc64-linux-gnu
Target: powerpc64-linux-gnu
Build: powerpc64-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-11-21 08:24:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2005-11-20 09:17:55 UTC
Running the testsuite, I see the following ICE:

Executing on host: /abuild/aj/gcc/gcc/xgcc -B/abuild/aj/gcc/gcc/ /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vect/pr22506.c   -O2 -ftr
ee-vectorize -maltivec -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -fno-show-column -S  -m64 -o pr22506.s    (timeout = 300)
/aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vect/pr22506.c: In function 'foo':
/aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vect/pr22506.c:12: internal compiler error: RTL check: expected code 'const_int', have 'co
nst_double' in output_vec_const_move, at config/rs6000/rs6000.c:2204
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
/aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vect/pr22506.c: In function 'foo':
/aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vect/pr22506.c:12: internal compiler error: RTL check: expected code 'const_int', have 'co
nst_double' in output_vec_const_move, at config/rs6000/rs6000.c:2204
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

FAIL: gcc.dg/vect/pr22506.c (test for excess errors)

This is with:
/opt/gcc/4.1-devel/bin/gcc -v
Using built-in specs.
Target: powerpc64-suse-linux-gnu
Configured with: /aj-cvs/gcc-svn/branches/gcc-4_1-branch/configure --prefix=/opt/gcc/4.1-devel --enable-checking=misc,tree,gc,rtl,rtlflag,assert --enable-threads=posix --enable-clocale=gnu --enable-__cxa_atexit --enable-shared --enable-languages=c,c++,treelang,java,f95,objc --with-system-zlib --with-cpu=default32 powerpc64-suse-linux-gnu
Thread model: posix
gcc version 4.1.0 20051119 (prerelease)
Comment 1 Andrew Pinski 2005-11-21 02:15:40 UTC
Confirmed, this is a regression.  The check for integer type was removed for some reason.
Comment 2 Paolo Bonzini 2005-11-21 08:24:28 UTC
easy_altivec_constant should only be called with AltiVec integer vector modes, all of which can be represented with a const_vector of const_ints.  Anyway, looking into it.

Paolo
Comment 3 Paolo Bonzini 2005-11-21 09:12:55 UTC
Got a patch, but I am curious about Andrew's comment.  I couldn't find a reason why r106588 *introduced* the bug rather than unveiling a latent one.
Comment 4 Paolo Bonzini 2005-11-21 16:38:18 UTC
Subject: Bug 24951

Author: bonzini
Date: Mon Nov 21 16:38:13 2005
New Revision: 107312

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107312
Log:
2005-11-21  Paolo Bonzini  <bonzini@gnu.org>

	PR target/24951
	* config/rs6000/rs6000.c (output_vec_const_move): Load cst and
	cst2 only for SPE vectors.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c

Comment 5 Paolo Bonzini 2005-11-21 17:04:15 UTC
Subject: Bug 24951

Author: bonzini
Date: Mon Nov 21 17:04:11 2005
New Revision: 107313

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107313
Log:
2005-11-21  Paolo Bonzini  <bonzini@gnu.org>

	PR target/24951
	* config/rs6000/rs6000.c (output_vec_const_move): Load cst and
	cst2 only for SPE vectors.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/config/rs6000/rs6000.c

Comment 6 Paolo Bonzini 2005-11-21 17:05:05 UTC
Andreas, can you confirm it is fixed?
Comment 7 Alan Modra 2005-11-22 05:05:19 UTC
I verified that an x86->powerpc64 mainline compiler built with --enable-checking=all compiles the testcase without errors.
Comment 8 Andreas Jaeger 2005-11-22 07:42:44 UTC
Seems to be fixed according to:
http://gcc.gnu.org/ml/gcc-testresults/2005-11/msg01060.html

Compare this with:
http://gcc.gnu.org/ml/gcc-testresults/2005-11/msg01039.html

Thanks!