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 4A969385771E for ; Wed, 30 Aug 2023 12:54:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A969385771E 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 relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 5AB6321868; Wed, 30 Aug 2023 12:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1693400050; 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=NDlmcPfvVxAwUUNGdwAvWGlBOl4Ii2hEaajQHhRMQ08=; b=HCYcinyF1fcoGoP5kcM89ikpsFRasQ8neZ/VP4UpQfcozAP44qzsxRdcTl6BmbEuy2IqL5 9rODGKCoH5mbKAxsSNHIIVhhACT8n9n7hYLUQwUqOs/Mcbi2LQAcB1uVLz1k9xBu61uYdf ayE/4ELO35i5suOV2JK8umyaKnNdpyQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1693400050; 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=NDlmcPfvVxAwUUNGdwAvWGlBOl4Ii2hEaajQHhRMQ08=; b=AUjlbEPB9+RlTXUQRDN5FVUgi3UakTZELln0LnIlUfTDHfMt1k3pGk9YtWWggnDrxTsIPH Ic6WPGwNvxSifhDg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 4FE972C142; Wed, 30 Aug 2023 12:54:10 +0000 (UTC) Date: Wed, 30 Aug 2023 12:54:10 +0000 (UTC) From: Richard Biener To: "Andre Vieira (lists)" cc: gcc-patches@gcc.gnu.org, Richard Sandiford , "jakub@redhat.com" Subject: Re: [Patch 3/8] vect: Fix vect_get_smallest_scalar_type for simd clones In-Reply-To: <6adafeff-e026-aec9-2b1a-8a5f736f813d@arm.com> Message-ID: References: <73b53052-c3a4-4028-2836-ade419431eda@arm.com> <6adafeff-e026-aec9-2b1a-8a5f736f813d@arm.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: On Wed, 30 Aug 2023, Andre Vieira (lists) wrote: > The vect_get_smallest_scalar_type helper function was using any argument to a > simd clone call when trying to determine the smallest scalar type that would > be vectorized. This included the function pointer type in a MASK_CALL for > instance, and would result in the wrong type being selected. Instead this > patch special cases simd_clone_call's and uses only scalar types of the > original function that get transformed into vector types. Looks sensible. +bool +simd_clone_call_p (gimple *stmt, cgraph_node **out_node) you could return the cgraph_node * or NULL here. Are you going to use the function elsewhere? Otherwise put it in the same TU as the only use please and avoid exporting it. Richard. > gcc/ChangeLog: > > * tree-vect-data-refs.cci (vect_get_smallest_scalar_type): Special > case > simd clone calls and only use types that are mapped to vectors. > * tree-vect-stmts.cc (simd_clone_call_p): New helper function. > * tree-vectorizer.h (simd_clone_call_p): Declare new function. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-simd-clone-16f.c: Remove unnecessary differentation > between targets with different pointer sizes. > * gcc.dg/vect/vect-simd-clone-17f.c: Likewise. > * gcc.dg/vect/vect-simd-clone-18f.c: Likewise. > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)