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 9F47B385E00A for ; Fri, 29 Jul 2022 06:28:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9F47B385E00A 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 C7BBD33BA4 for ; Fri, 29 Jul 2022 06:28:48 +0000 (UTC) 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 B6A4D13A1B for ; Fri, 29 Jul 2022 06:28:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4HF+KyB+42IiGAAAMHmgww (envelope-from ) for ; Fri, 29 Jul 2022 06:28:48 +0000 Date: Fri, 29 Jul 2022 08:28:48 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Avoid vect_get_vector_types_for_stmt MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20220729062848.B6A4D13A1B@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 06:28:51 -0000 This replaces vect_get_vector_types_for_stmt with get_vectype_for_scalar_type in vect_recog_bool_pattern. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-patterns.cc (vect_recog_bool_pattern): Use get_vectype_for_scalar_type instead of vect_get_vector_types_for_stmt. --- gcc/tree-vect-patterns.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index dfbfb71b3c6..09574bb1a26 100644 --- a/gcc/tree-vect-patterns.cc +++ b/gcc/tree-vect-patterns.cc @@ -4509,10 +4509,8 @@ vect_recog_bool_pattern (vec_info *vinfo, && STMT_VINFO_DATA_REF (stmt_vinfo)) { stmt_vec_info pattern_stmt_info; - tree nunits_vectype; - if (!vect_get_vector_types_for_stmt (vinfo, stmt_vinfo, &vectype, - &nunits_vectype) - || !VECTOR_MODE_P (TYPE_MODE (vectype))) + vectype = get_vectype_for_scalar_type (vinfo, TREE_TYPE (lhs)); + if (!vectype || !VECTOR_MODE_P (TYPE_MODE (vectype))) return NULL; if (check_bool_pattern (var, vinfo, bool_stmts)) -- 2.35.3