From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112896 invoked by alias); 7 May 2015 09:14:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 112887 invoked by uid 89); 7 May 2015 09:14:50 -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,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 07 May 2015 09:14:49 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t479EhCc010319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 7 May 2015 05:14:43 -0400 Received: from tucnak.zalov.cz (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t479Eg2j010857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 7 May 2015 05:14:43 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t479Eeng024414; Thu, 7 May 2015 11:14:40 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t479EbAL024413; Thu, 7 May 2015 11:14:37 +0200 Date: Thu, 07 May 2015 09:14:00 -0000 From: Jakub Jelinek To: Thomas Schwinge Cc: Richard Sandiford , Bernd Schmidt , gcc-patches@gcc.gnu.org Subject: Re: [nvptx] Re: Mostly rewrite genrecog Message-ID: <20150507091437.GG1751@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <87egn5yis1.fsf@e105548-lin.cambridge.arm.com> <871tisvk4q.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871tisvk4q.fsf@kepler.schwinge.homeip.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00526.txt.bz2 On Thu, May 07, 2015 at 10:59:01AM +0200, Thomas Schwinge wrote: > build/genrecog [...]/source-gcc/gcc/common.md [...]/source-gcc/gcc/config/nvptx/nvptx.md \ > insn-conditions.md > tmp-recog.c > -[...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 0 missing mode? > -[...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 1 missing mode? > > gcc/config/nvptx/nvptx.md: > > 1206 (define_insn "allocate_stack" > 1207 [(set (match_operand 0 "nvptx_register_operand" "=R") > 1208 (unspec [(match_operand 1 "nvptx_register_operand" "R")] > 1209 UNSPEC_ALLOCA))] > 1210 "" > 1211 "%.\\tcall (%0), %%alloca, (%1);") > > Are these two (former) warnings a) something that should still be > reported by genrecog, Yes. > and b) something that should be addressed (Bernd)? Yes. Supposedly you want :P on both match_operand and unspec too, but as this serves not just as an insn pattern, but also as expander that needs to have this particular name, supposedly you want: (define_expand "allocate_stack" [(match_operand 0 "nvptx_register_operand") (match_operand 1 "nvptx_register_operand")] "" { if (TARGET_ABI64) emit_insn (gen_allocate_stack_di (operands[0], operands[1])); else emit_insn (gen_allocate_stack_si (operands[0], operands[1])); DONE; }) (define_insn "allocate_stack_" [(set (match_operand:P 0 "nvptx_register_operand" "=R") (unspec:P [(match_operand:P 1 "nvptx_register_operand" "R")] UNSPEC_ALLOCA))] "" "%.\\tcall (%0), %%alloca, (%1);") rr so. Of course, as even latest Cuda drop doesn't support alloca, this is quite dubious, perhaps better would be sorry on it. BTW, with Cuda 7.0, even printf doesn't work anymore, is that known? Jakub