From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13172 invoked by alias); 24 Jan 2008 13:49:20 -0000 Received: (qmail 13017 invoked by uid 48); 24 Jan 2008 13:48:34 -0000 Date: Thu, 24 Jan 2008 14:02:00 -0000 Message-ID: <20080124134834.13016.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/34856] [4.2/4.3 Regression] ICE with some constant vectors In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg02879.txt.bz2 ------- Comment #20 from ubizjak at gmail dot com 2008-01-24 13:48 ------- (In reply to comment #19) > Uros, can you handle x86? Sometimes CONSTANT_P is just too broad to construct correct RTX. This patch creates most sensible asm (i.e. using movd instead of movdqa): --cut here-- Index: i386.c =================================================================== --- i386.c (revision 131776) +++ i386.c (working copy) @@ -23593,7 +23593,9 @@ ix86_expand_vector_init (bool mmx_ok, rt for (i = 0; i < n_elts; ++i) { x = XVECEXP (vals, 0, i); - if (!CONSTANT_P (x)) + if (!(CONST_INT_P (x) + || GET_CODE (x) == CONST_DOUBLE + || GET_CODE (x) == CONST_FIXED)) n_var++, one_var = i; else if (x != CONST0_RTX (inner_mode)) all_const_zero = false; --cut here-- f1: pushl %ebx subl $24, %esp movl 32(%esp), %ebx movd .LC0, %xmm0 movdqa %xmm0, (%esp) .p2align 4,,7 .p2align 3 .L2: movdqa (%esp), %xmm0 call f subl $1, %ebx jne .L2 addl $24, %esp popl %ebx ret .size f1, .-f1 .section .rodata.cst4,"aM",@progbits,4 .align 4 .LC0: .long g+32 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34856