From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id C361D398D40B for ; Thu, 22 Jul 2021 13:04:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C361D398D40B Received: by mail-ed1-x52d.google.com with SMTP id w14so6708925edc.8 for ; Thu, 22 Jul 2021 06:04:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1FEbWoolV9xXLZRWcW1kBUKExkKBofceOlIiLKFzdtQ=; b=nGicYEw1i0Az5qnh7ze7839KWI/AWRwSn1IFY4t/kDdhcKxVFBql/4+C+w9uGcm1Ib DMb23DUHu5P7ozxv0rQICg146Yg7MMWf31WIrMZRITx+zmQq2mFDXeny6okRNFwFd5Rl aKABHEE1KyduDQXMm3UIdAfiKLu2mGoaXvVoWHT5l4Yr5Mqqp5xXY9h28CA2tljhLoTv x/PnVNfGMysEMZMor30RiQMm7oWOZ+anZb1hNUqjjrxaWnv6f1q4DvVs+5ypioANSYpj 7RTTHoRQ/Gi9wlktTpP8aUO9iyBlc2PZkucYxERUShM/Fql0/zU19R5z1atcTC53OCvp 3sSg== X-Gm-Message-State: AOAM531SpmzjF7pFuk71ZEowYAYy346NXNkkw785LXtG3sfsifxATTae MAQD1HC7qdMawVRST7e1+QGjI97FRpX4nXucXzQ= X-Google-Smtp-Source: ABdhPJwhGz+Bfds2WohK6luJJ6w1MrjvXM7xkPfDcLW4zoY73ETo1onxL2entmvu/Sc5zilgRCGoR+Xk0aD0UtXXa9Q= X-Received: by 2002:a50:8d4e:: with SMTP id t14mr44898372edt.138.1626959082826; Thu, 22 Jul 2021 06:04:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Thu, 22 Jul 2021 15:04:32 +0200 Message-ID: Subject: Re: 0001-Don-t-skip-prologue-instructions-as-it-could-affect-.patch To: "Bin.Cheng" , Eric Botcazou , Jeff Law , Segher Boessenkool Cc: "bin.cheng" , GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Thu, 22 Jul 2021 13:04:45 -0000 On Thu, Jul 22, 2021 at 9:02 AM Bin.Cheng via Gcc-patches wrote: > > Gentle ping. Any suggestions would be appreciated. So just to say something - does the existing code mean that any use of the alias info on prologue/epilogue insns is wrong? We have /* The prologue/epilogue insns are not threaded onto the insn chain until after reload has completed. Thus, there is no sense wasting time checking if INSN is in the prologue/epilogue until after reload has completed. */ bool could_be_prologue_epilogue = ((targetm.have_prologue () || targetm.have_epilogue ()) && reload_completed); so when !could_be_prologue_epilogue then passes shouldn't run into them if the comment is correct. But else even epilogue stmts could appear anywhere (like scheduled around)? So why's skipping those OK? Are passes supposed to check whether they are dealing with pro/epilogue insns and not touch them? CCing people that might know. Richard. > Thanks, > bin > > On Wed, Jul 14, 2021 at 5:15 PM bin.cheng via Gcc-patches > wrote: > > > > Hi, > > I ran into a wrong code bug in code with deep template instantiation when working on sdx::simd. > > The root cause as described in commit summary is we skip prologue insns in init_alias_analysis. > > This simple patch fixes the issue, however, it's hard to reduce a case because of heavy use of > > templates. > > Bootstrap and test on x86_64, is it OK? > > > > Thanks, > > bin