From patchwork Fri Nov 11 16:30:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 125209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 580BEB70BF for ; Sat, 12 Nov 2011 03:30:59 +1100 (EST) Received: (qmail 17091 invoked by alias); 11 Nov 2011 16:30:53 -0000 Received: (qmail 17075 invoked by uid 22791); 11 Nov 2011 16:30:51 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Nov 2011 16:30:37 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ROtzv-0005Va-Eh from Bernd_Schmidt@mentor.com ; Fri, 11 Nov 2011 08:30:35 -0800 Received: from [127.0.0.1] ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 11 Nov 2011 16:30:33 +0000 Message-ID: <4EBD4D9F.8040008@codesourcery.com> Date: Fri, 11 Nov 2011 17:30:23 +0100 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110920 Lightning/1.0b3pre Thunderbird/3.1.12 MIME-Version: 1.0 To: "Henderson, Stuart" CC: "jakub@redhat.com" , "rguenther@suse.de" , "ebotcazou@adacore.com" , "gcc-patches@gcc.gnu.org" , "richard.sandiford@linaro.org" Subject: Re: [PATCH] Optimize in RTL vector AND { -1, -1, ... }, IOR { -1, -1, ... } and XOR { -1, -1, ... } (take 2) References: <05E9E85E39C35B4D96ED3A3190E35A10ACD32188B0@LIMKCMBX1.ad.analog.com> In-Reply-To: <05E9E85E39C35B4D96ED3A3190E35A10ACD32188B0@LIMKCMBX1.ad.analog.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 10/31/11 14:24, Henderson, Stuart wrote: >> 2011-09-26 Jakub Jelinek >> >> * rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE >> from 3 x MAX_MACHINE_MODE. >> (CONSTM1_RTX): Define. >> * emit-rtl.c (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE >> from 3 x MAX_MACHINE_MODE. >> (gen_rtx_CONST_VECTOR): Use CONSTM1_RTX if all inner constants are >> CONSTM1_RTX. >> (init_emit_once): Initialize CONSTM1_RTX for MODE_INT and >> MODE_VECTOR_INT modes. >> * simplify-rtx.c (simplify_binary_operation_1) : >> Optimize if one operand is CONSTM1_RTX. >> * config/i386/i386.c (ix86_expand_sse_movcc): Optimize mask ? -1 : x >> into mask | x. > > FYI - this patch (179238) breaks the Blackfin compiler build with an internal compiler error during configure of libgcc: > conftest.c:1:0: internal compiler error: in gen_const_vector, at emit-rtl.c:5491 This fixes it. Looks obvious enough to me; hence will commit Monday if no objections. Bernd * emit-rtl.c (init_emit_once): Initialize const_tiny_rtx[3] for partial integer modes. Index: emit-rtl.c =================================================================== --- emit-rtl.c (revision 181252) +++ emit-rtl.c (working copy) @@ -5706,6 +5706,11 @@ init_emit_once (void) mode = GET_MODE_WIDER_MODE (mode)) const_tiny_rtx[3][(int) mode] = constm1_rtx; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_PARTIAL_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + const_tiny_rtx[3][(int) mode] = constm1_rtx; + for (mode = GET_CLASS_NARROWEST_MODE (MODE_COMPLEX_INT); mode != VOIDmode; mode = GET_MODE_WIDER_MODE (mode))