From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 215723857017 for ; Tue, 26 Sep 2023 20:52:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 215723857017 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E2FE11FB; Tue, 26 Sep 2023 13:53:14 -0700 (PDT) Received: from [10.57.69.45] (unknown [10.57.69.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9233B3F59C; Tue, 26 Sep 2023 13:52:35 -0700 (PDT) Message-ID: <71bd259a-d3fa-9458-4ae2-b29099dd6bd5@arm.com> Date: Tue, 26 Sep 2023 21:52:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] vect, omp: inbranch simdclone dropping const Content-Language: en-US To: Jakub Jelinek Cc: "gcc-patches@gcc.gnu.org" , Richard Sandiford , Richard Biener , Andrew Stubbs References: From: "Andre Vieira (lists)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,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 26/09/2023 17:48, Jakub Jelinek wrote: > On Tue, Sep 26, 2023 at 05:24:26PM +0100, Andre Vieira (lists) wrote: >> @@ -5816,6 +5817,18 @@ get_references_in_stmt (gimple *stmt, vec *references) >> } >> case IFN_MASK_LOAD: >> case IFN_MASK_STORE: >> + case IFN_MASK_CALL: >> + { >> + tree orig_fndecl >> + = gimple_call_addr_fndecl (gimple_call_arg (stmt, 0)); >> + if (!orig_fndecl) >> + { >> + clobbers_memory = true; >> + break; >> + } >> + if ((flags_from_decl_or_type (orig_fndecl) & ECF_CONST) == 0) >> + clobbers_memory = true; >> + } > > Should IFN_MASK_LOAD/STORE really go through this? I thought those have > first argument address of the memory being conditionally loaded/stored, not > function address. > No it shouldn't, my bad... Surprising testing didn't catch it though, I'm guessing gimple_call_addr_fndecl just returned null everytime for those. I'll clean it up.