From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 387213858C5F; Fri, 26 May 2023 22:28:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 387213858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685140137; bh=tpPrrHwqdLg223MWfGuNL89O0MmIsth1My5KIPVmhl0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=olVGW+RH2x0fjOfXRbQ8tL3Uv4wBWiA/IcAV00c7eJQCUbfjUw1zYv1iHt8jPNWXC sqfLcs8RPSv/cVf1h3gMVSgBZpcpcuO+aWj5TxFeGh5NLxfE5Tp/nRQaWrF4PKQspx 1JOb8MhtxvI/l+IrO9s9v6Ic30k+kvidbZyt8c0U= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109985] __builtin_prefetch ignored by GCC 12/13 Date: Fri, 26 May 2023 22:28:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109985 --- Comment #4 from Andrew Pinski --- Hmm: modref analyzing 'void boost::unordered::detail::foa::prefetch(const void*)/3452' (ipa=3D0) (pure) Analyzing flags of ssa name: p_1(D) Analyzing stmt: __builtin_prefetch (p_1(D)); current flags of p_1(D) no_direct_clobber no_indirect_clobber no_direct_escape no_indirect_escape not_returned_directly not_returned_indirectly no_direct_read no_indirect_read flags of ssa name p_1(D) no_direct_clobber no_indirect_clobber no_direct_es= cape no_indirect_escape not_returned_directly not_returned_indirectly no_direct_= read no_indirect_read Always executed bbbs (assuming return or EH): 2 - Analyzing call:__builtin_prefetch (p_1(D)); - ECF_CONST | ECF_NOVOPS, ignoring all stores and all loads except for arg= s. Function found to be const: void boost::unordered::detail::foa::prefetch(co= nst void*)/3452 Declaration updated to be const: void boost::unordered::detail::foa::prefetch(const void*)/3452 - modref done with result: tracked. loads: stores: Try dse parm 0 flags: not_returned_directly not_returned_indirectly no_direct_read no_indirect_read void boost::unordered::detail::foa::prefetch (const void * p) { [local count: 1073741824]: __builtin_prefetch (p_1(D)); return; } Maybe that explains it,=20 DEF_GCC_BUILTIN (BUILT_IN_PREFETCH, "prefetch", BT_FN_VOID_CONST_PTR_VAR, ATTR_NOVOPS_LEAF_LIST)=