There seems to be problems related to compile time determinable constants as arguments of the MMX builtin functions. (This bug appears to occur with gcc-3.2 as well, though I've only tested the Red Hat 8 compiler, not stock 3.2) Release: CVS head, 7 December 2002 Environment: Linux/ia32 How-To-Repeat: The following code, when compiled with: gcc -c -O1 -mmmx -march=i686 -mcpu=i686 constant-pool-bug.c === typedef int v4hi __attribute__ ((mode(V4HI))); typedef int di __attribute__ ((mode(DI))); static const di mmx_constants[1] = { 0x00ff000000000000LL }; v4hi foo (v4hi val) { return __builtin_ia32_paddw (val, (v4hi)mmx_constants[0]); } === Produces: === constant-pool-bug.c: In function `foo': constant-pool-bug.c:9: internal compiler error: in output_constant_pool, at varasm.c:3485 === This does not occur with -O0. Note that the cast to 'v4hi' seems to be important here. If you try the same thing using porl, which takes a 'di' directly: === typedef int di __attribute__ ((mode(DI))); static const di mmx_constants[1] = { 0x00ff000000000000LL }; di foo (di val) { return __builtin_ia32_por (val, mmx_constants[0]); } === You get a different ICE: === constant-pool-bug.c: In function `foo': constant-pool-bug.c:7: internal compiler error: in ix86_expand_binop_builtin, at config/i386/i386.c:12819 === Which I believe is a a duplicate of #8600. (Some circumstantial evidence indicates that #8600 is hiding this bug here, not vice versa, but I'm not sure about that.)
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed. The bug is already present in gcc 3.1
From: Dara Hazeghi <dhazeghi@yahoo.com> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: target/8869: [x86 MMX]ICE with const variable optimization and MMX builtins Date: Fri, 9 May 2003 21:54:03 -0700 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gcc&pr=8869 Hello, I can confirm that on gcc 3.2.3, 3.3 branch and mainline, the ICE noted in this PR is still present. Dara
The second ICE is the same as bug 10984 which has a different testcase but the same problem.
The first ICE was already filed under 7277.
The bug does not appear on the tree-ssa-branch.
It might not show up on the tree-ssa branch because the rtl is different does not mean this is not a bug that still needs to be fixed because it can happen (do not know how) on tree-sssa branch.
Now the ICE also appears on the tree-ssa-branch.
This is not a regression, removing markers and setting milestone to 3.4.
Subject: Bug 8869 CVSROOT: /cvs/gcc Module name: gcc Changes by: hubicka@gcc.gnu.org 2003-08-23 21:18:58 Modified files: gcc : expr.c ChangeLog gcc/config/i386: i386.c i386.h i386.md Log message: PR target/11369 * i386.c (ix86_expand_carry_flag_compare): Validate operand. PR target/11031 * i386.c (const_0_to_3_operand, const_0_to_7_operand, const_0_to_15_operand, const_0_to_255_operand): New predicates. * i386.h (PREDICATE_CODES): Add these. * i386.c (pinsrw and pextrw patterns): Use them. PR target/10984 * i386.c (ix86_expand_binop_builtin): Behave sanely for VOIDmodes. PR target/8869 * expr.c (convert_modes): Deal properly with integer to vector constant conversion. PR target/8871 * i386.md (zero_extendsidi2*): Add MMX and SSE alternatives. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&r1=1.577&r2=1.578 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.864&r2=2.865 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.595&r2=1.596 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.h.diff?cvsroot=gcc&r1=1.350&r2=1.351 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.480&r2=1.481
Fixed on the mainline by the patch above.
Subject: Bug 8869 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: hubicka@gcc.gnu.org 2003-09-06 08:06:16 Modified files: gcc : expr.c ChangeLog Log message: PR target/8869 * expr.c (convert_modes): Deal properly with integer to vector constant conversion. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.498.2.20&r2=1.498.2.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.722&r2=1.16114.2.723