From patchwork Wed Jul 2 07:52:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 366280 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47150140096 for ; Wed, 2 Jul 2014 17:52:51 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=j/0APNOLk4uQxu3J9 fmzt4mtOq7bNxQzGXFSNHR0nT+8OqJIjG1qzoDJO1rpQStpOgCKq1U/Q0jFBpMnF sbveTBOntYMhFXx/HMbvX01KvW9+r0sNznWzWeR+rCkjKEgFFQiIgJycWHJ7aJsd lEVp2/d0Ub3yD72naP2AIF9C0o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=muHyiXpOxKlbap+JQDojvCT PRGs=; b=Ly6JnPPiWIb/G0aI+kL0tJcD0TE/zd1uHtGZIeyKXd1fawORJj9+Jpb Wed6v97x0Kxh1X24L3mUy2p5p4PwdPjrc+4OvbuSPca1y2OKtZVfgfrjgG3tU5jy 8kP37QwGAVhlXLtVu1Nj/6Av/5gZFHY9d3w4lzRs/+Bz3qiH05ho= Received: (qmail 22041 invoked by alias); 2 Jul 2014 07:52:45 -0000 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 Received: (qmail 22026 invoked by uid 89); 2 Jul 2014 07:52:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Jul 2014 07:52:42 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1X2FLK-000086-Lf from Tom_deVries@mentor.com ; Wed, 02 Jul 2014 00:52:38 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 2 Jul 2014 00:52:38 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 2 Jul 2014 08:52:36 +0100 Message-ID: <53B3BA3B.8020705@mentor.com> Date: Wed, 2 Jul 2014 09:52:27 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Jeff Law CC: Vladimir Makarov , GCC Patches Subject: [PATCH] Don't allow combination of read/write and earlyclobber constraint modifier References: <53B30B96.2000603@mentor.com> <53B31041.8060608@redhat.com> In-Reply-To: <53B31041.8060608@redhat.com> On 01-07-14 21:47, Jeff Law wrote: > On 07/01/14 13:27, Tom de Vries wrote: >> So my question is: is the combination of '&' and '+' supported ? If so, >> what is the exact semantics ? If not, should we warn or give an error ? > > I don't think we can define any reasonable semantics for &+. My recommendation > would be for this to be considered a hard error. > [ move discussion from gcc ml to gcc-patches ml ] Attached patch detects the combination of + and & constrains during genrecog, and generates an error like this: ... /home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020: operand 0 has in-out reload, incompatible with earlyclobber /home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020: operand 0 has in-out reload, incompatible with earlyclobber /home/vries/gcc_versions/devel/src/gcc/config/aarch64/aarch64-simd.md:1020: operand 0 has in-out reload, incompatible with earlyclobber make[2]: *** [s-recog] Error 1 ... The error triggers three times, once for each mode iterator element. OK if x86_64 bootstrap succeeds ? Thanks, - Tom 2014-07-02 Tom de Vries * genrecog.c (validate_pattern): Don't allow earlyclobber constraint modifier with read/write constraint modifier. diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 457b59c..ad709ee 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -481,6 +481,13 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code) rtx_name[GET_CODE (insn)]); } + if (constraints0 == '+' + && strchr (XSTR (pattern, 2), '&') != NULL) + error_with_line (pattern_lineno, + "operand %d has in-out reload, incompatible with" + " earlyclobber", + XINT (pattern, 0)); + /* A MATCH_OPERAND that is a SET should have an output reload. */ else if (set && constraints0) { -- 1.9.1