From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 83C943839DA4 for ; Fri, 25 Nov 2022 20:08:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 83C943839DA4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5F07521A9C; Fri, 25 Nov 2022 20:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669406909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fIohzkBH44vup1ysB4KyazmK9EA1sRRIDlUW21mRLE8=; b=Z2ksHtywBDpysG+DZ+PgNIkWdv1C5pRF+ksMzr64ij86DW1MzklxudxXYN3RAXxyOnUCHV ItNBoLj5n8JMyblkvO6xCKf2XFFz3avEGHUU5HxOJTtFQGEu3Oww9Vuf6QuCYvkmU1XwnN RHYcgAjXNWrBQV2GqUljL34ihh4EXkk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669406909; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fIohzkBH44vup1ysB4KyazmK9EA1sRRIDlUW21mRLE8=; b=mIZ+uFWdw6VWUPkYSmsIb6y35/j1nPAFdagDXJDsgSoN8Q3tEDoiq7nS3POEFKATHdp07w biO1re8+X8tpHLBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 42CBE13A08; Fri, 25 Nov 2022 20:08:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id zHfSDr0ggWPIBAAAMHmgww (envelope-from ); Fri, 25 Nov 2022 20:08:29 +0000 Date: Fri, 25 Nov 2022 21:08:28 +0100 (CET) From: Richard Biener X-X-Sender: rguenther@rguenther-XPS-13-9380 To: Vaseeharan Vinayagamoorthy cc: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] tree-optimization/107672 - avoid vector mode type_for_mode call In-Reply-To: Message-ID: References: <20221122084850.B6CA313B01@imap2.suse-dmz.suse.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-143116517-1669406909=:3568" X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_ASCII_DIVIDERS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-143116517-1669406909=:3568 Content-Type: text/plain; charset=Windows-1252; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 25 Nov 2022, Vaseeharan Vinayagamoorthy wrote: > Hi, > > I am seeing an internal compiler error, related to this patch: Can you please open a bugzilla for this and attach preprocessed source so I can reproduce the ICE with a cc1 cross compiler? Thanks, Richard. > > during GIMPLE pass: slp > > options-save.cc: In function 'void cl_optimization_restore(gcc_options*, > gcc_options*, cl_optimization*)': > > options-save.cc:1292:1: internal compiler error: in > supportable_widening_operation, at tree-vect-stmts.cc:12199 > >   > >  1292 | cl_optimization_restore (struct gcc_options *opts, struct > gcc_options *opts_set, > >  | ^~~~~~~~~~~~~~~~~~~~~~~ > > /…/src/gcc/gcc/profile-count.cc: In member function 'int > profile_count::to_cgraph_frequency(profile_count) const': > > /…/src/gcc/gcc/profile-count.cc:308:1: note: parameter passing for argument > of type 'profile_count' changed in GCC 9.1 > >  308 | profile_count::to_cgraph_frequency (profile_count entry_bb_count) > const > >  | ^~~~~~~~~~~~~ > > /…/src/gcc/gcc/profile-count.cc: In member function 'sreal > profile_count::to_sreal_scale(profile_count, bool*) const': > > /…/src/gcc/gcc/profile-count.cc:326:1: note: parameter passing for argument > of type 'profile_count' changed in GCC 9.1 > >  326 | profile_count::to_sreal_scale (profile_count in, bool *known) const > >  | ^~~~~~~~~~~~~ > > 0x2195bdd supportable_widening_operation(vec_info*, tree_code, > _stmt_vec_info*, tree_node*, tree_node*, tree_code*, tree_code*, int*, > vec*) > >  /…/src/gcc/gcc/tree-vect-stmts.cc:12199 > > 0x2180493 vectorizable_conversion > >  /…/src/gcc/gcc/tree-vect-stmts.cc:5064 > > 0x2192fdd vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*, > _slp_instance*, vec*) > >  /…/src/gcc/gcc/tree-vect-stmts.cc:11256 > >   > > /…/src/gcc/gcc/profile-count.cc: In member function 'profile_count > profile_count::combine_with_ipa_count(profile_count)': > > /…/src/gcc/gcc/profile-count.cc:398:1: note: parameter passing for argument > of type 'profile_count' changed in GCC 9.1 > >  398 | profile_count::combine_with_ipa_count (profile_count ipa) > >  | ^~~~~~~~~~~~~ > > 0x14f95d1 vect_slp_analyze_node_operations_1 > >  /…/src/gcc/gcc/tree-vect-slp.cc:5958 > > 0x14f9c19 vect_slp_analyze_node_operations > >  /…/src/gcc/gcc/tree-vect-slp.cc:6147 > > 0x14f9b4d vect_slp_analyze_node_operations > >  /…/src/gcc/gcc/tree-vect-slp.cc:6126 > > 0x14fa439 vect_slp_analyze_operations(vec_info*) > >  /…/src/gcc/gcc/tree-vect-slp.cc:6387 > > 0x14fd423 vect_slp_analyze_bb_1 > >  /…/src/gcc/gcc/tree-vect-slp.cc:7372 > > 0x14fd599 vect_slp_region > >  /…/src/gcc/gcc/tree-vect-slp.cc:7419 > > 0x14fe0d1 vect_slp_bbs > >  /…/src/gcc/gcc/tree-vect-slp.cc:7610 > > 0x14fe46f vect_slp_function(function*) > >  /…/src/gcc/gcc/tree-vect-slp.cc:7698 > > 0x151a109 execute > >  /…/src/gcc/gcc/tree-vectorizer.cc:1532 > > Please submit a full bug report, with preprocessed source (by using > -freport-bug). > > Please include the complete backtrace with any bug report. > > See for instructions. > > Makefile:1146: recipe for target 'options-save.o' failed > > make[3]: *** [options-save.o] Error 1 > > > > That happens when building the arm-none-linux-gnueabihf toolchain natively > with glibc bootstrap: > Build:arm-none-linux-gnueabihf > Host:arm-none-linux-gnueabihf > Target: arm-none-linux-gnueabihf > > The compiler being used to build the toolchain is gcc 7.5.0. > > > Kind regards > Vasee > > ____________________________________________________________________________ > From: Gcc-patches on > behalf of Richard Biener via Gcc-patches > Sent: 22 November 2022 08:48 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] tree-optimization/107672 - avoid vector mode type_for_mode > call   > The following avoids using type_for_mode on vector modes which might > not work for all frontends.  Instead we look for the inner mode > type and use build_vector_type_for_mode instead. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. > >         PR tree-optimization/107672 >         * tree-vect-stmts.cc (supportable_widening_operation): Avoid >         type_for_mode on vector modes. > --- >  gcc/tree-vect-stmts.cc | 12 +++++++++--- >  1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc > index bc0ef136f19..b35b986889d 100644 > --- a/gcc/tree-vect-stmts.cc > +++ b/gcc/tree-vect-stmts.cc > @@ -12195,9 +12195,15 @@ supportable_widening_operation (vec_info *vinfo, >          intermediate_type >            = vect_halve_mask_nunits (prev_type, intermediate_mode); >        else > -       intermediate_type > -         = lang_hooks.types.type_for_mode (intermediate_mode, > -                                           TYPE_UNSIGNED (prev_type)); > +       { > +         gcc_assert (VECTOR_MODE_P (intermediate_mode)); > +         tree intermediate_element_type > +           = lang_hooks.types.type_for_mode (GET_MODE_INNER > (intermediate_mode), > +                                             TYPE_UNSIGNED (prev_type)); > +         intermediate_type > +           = build_vector_type_for_mode (intermediate_element_type, > +                                         intermediate_mode); > +       } >   >        if (VECTOR_BOOLEAN_TYPE_P (intermediate_type) >            && VECTOR_BOOLEAN_TYPE_P (prev_type) > -- > 2.35.3 > > --8323329-143116517-1669406909=:3568--