Bug 21102

Summary: ICE: in immed_double_const, on SSE2 intrinsics
Product: gcc Reporter: Chih-Chung Chang <jochang>
Component: rtl-optimizationAssignee: Richard Henderson <rth>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P2 Keywords: ice-on-valid-code, ssemmx
Version: 4.0.0   
Target Milestone: 4.0.1   
Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu Known to work:
Known to fail: Last reconfirmed: 2005-04-23 18:55:57

Description Chih-Chung Chang 2005-04-19 10:49:11 UTC
ICE on gcc 4.0.0rc2, but both 3.3.5 and 3.4.3 work.

$ /usr/local/gcc-4.0/bin/g++ -c -O -msse2 4.cpp
4.cpp: In function 'void f()':
4.cpp:10: internal compiler error: in immed_double_const, at emit-rtl.c:467

Here is the source:

#include <emmintrin.h>
__m128i S;
void f()
{
  __m128i A;
  A = _mm_add_epi8(A,A);
  A = _mm_andnot_si128(A,A);
  A = _mm_or_si128(A,A);
  _mm_store_si128(&S,A);
}
Comment 1 Richard Henderson 2005-04-23 18:55:57 UTC
Confirmed.
Comment 2 Richard Henderson 2005-04-23 18:57:21 UTC
Technically this is generic, though one does have to have vector support in the
target for things to make it this far to see.
Comment 3 GCC Commits 2005-04-23 19:01:21 UTC
Subject: Bug 21102

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	rth@gcc.gnu.org	2005-04-23 19:01:04

Modified files:
	gcc            : ChangeLog simplify-rtx.c 

Log message:
	PR rtl-opt/21102
	* simplify-rtx.c (simplify_binary_operation): Fix mode check before
	performing some integral scalar simplifications.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.181&r2=2.7592.2.182
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/simplify-rtx.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.230.2.3&r2=1.230.2.4

Comment 4 GCC Commits 2005-04-23 19:17:06 UTC
Subject: Bug 21102

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-04-23 19:16:57

Modified files:
	gcc            : ChangeLog simplify-rtx.c 

Log message:
	PR rtl-opt/21102
	* simplify-rtx.c (simplify_binary_operation): Fix mode check before
	performing some integral scalar simplifications.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8426&r2=2.8427
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/simplify-rtx.c.diff?cvsroot=gcc&r1=1.237&r2=1.238

Comment 5 Richard Henderson 2005-04-23 19:18:43 UTC
Fixed.