From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id 132683857734 for ; Mon, 24 Apr 2023 12:08:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 132683857734 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2a8b1b51dbdso39582031fa.0 for ; Mon, 24 Apr 2023 05:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682338095; x=1684930095; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kUJz+MLTa6KyzZhz12pFd4c7Wt9UP1Q1yHFuLOPkjvM=; b=eQvTrwJZ/2YZzqAdhN2i5W4dGIpNcrmm/fYpBE6p3fm1zj2iazMUX7q7hl5w23vc1d MdNyTFv9PGIOx220LU1f9GJT0Qh6PK1KuDXacMpWemIZmEbMYoeSkNYGR18ngIl+MP9X JhQ0iZ3vSeq4KYud2P2R43u8b/cDDddXrM9TVUbQpaTZSdFJFlHoxMGQuonBBERWliJP zFytmGwgX5MbldSSzenh7GsWqbs5kuDcGFStXR2NR0twNtuHtSSdF/A+2gbRPKXam+fk zoBATDqNyOInhyUYYR0YJLsb98aVNjuZqINncDoF9AvkV7WXSOjUiiyHYcwLhvFoILGi ChAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682338095; x=1684930095; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kUJz+MLTa6KyzZhz12pFd4c7Wt9UP1Q1yHFuLOPkjvM=; b=P1bmq+2UMpMW6ivrq9VIz8xCKlUpLfuKVN6vIgLwVqctLhDj4pVHsr3IQ62pMM6Ua6 kIWd3YKIENyFUAk0HnxruDEbHAviUhrWqitQhSeAG3F3rKdCr3QdLwZPl2EUCEXF4Fdu SeoVM/AGlcmR1ZYz/K9amPxeHcmOeyr+ygK6tyrbv8XF4jdfIJhk7VTLL/N0idVjkKPg v+USiX1F7EIFOzq/oZAqbP7fuaq7e+VwXgw+n757LWePQlzSYK7L25KvGY9zPNUZRL2I 9/RmV3r05F17S3jZjgc+28uqU6s7lHGTFtUzOw8qK4TuAriCN8rkhCerWtU/YP54C3b+ dQZg== X-Gm-Message-State: AAQBX9eFM411VsDzNHhTjR1tQ4YvRukHZSbifSWaw7k8+CQVsFJqDG+t +IClPTZacYUKblKp7gRv8+J0G4VFNkCF6+oixXKRGCGc X-Google-Smtp-Source: AKy350bwB8BC+VUF8EuKvvkJ7PDDUeAvEKFPagNZ3Xmrwgd/rqnwQlFqjDKbpoMe8xwiJKXmlKDeSvbzby6TsDLu5kU= X-Received: by 2002:a2e:3803:0:b0:29a:1f7d:38b1 with SMTP id f3-20020a2e3803000000b0029a1f7d38b1mr2361461lja.28.1682338095537; Mon, 24 Apr 2023 05:08:15 -0700 (PDT) MIME-Version: 1.0 References: <20230422220921.452264-1-apinski@marvell.com> <20230422220921.452264-4-apinski@marvell.com> In-Reply-To: <20230422220921.452264-4-apinski@marvell.com> From: Richard Biener Date: Mon, 24 Apr 2023 14:06:50 +0200 Message-ID: Subject: Re: [PATCH 3/6] PHIOPT: Allow other diamond uses when do_hoist_loads is true To: Andrew Pinski Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Sun, Apr 23, 2023 at 12:13=E2=80=AFAM Andrew Pinski via Gcc-patches wrote: > > While working on adding diamond shaped form to match-and-simplify > phiopt, I Noticed that we would not reach there if do_hoist_loads > was true. In the original code before the cleanups it was not > obvious why but after I finished the cleanups, it was just a matter > of removing a continue and that is what this patch does. > > This just happens also to fix a bug report that I noticed too. > > OK? Bootstrapped and tested on x86_64-linux-gnu. OK. > gcc/ChangeLog: > > PR tree-optimize/68894 > * tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Remove the > continue for the do_hoist_loads diamond case. > --- > gcc/tree-ssa-phiopt.cc | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc > index 05f19825ce9..e4062f33efa 100644 > --- a/gcc/tree-ssa-phiopt.cc > +++ b/gcc/tree-ssa-phiopt.cc > @@ -243,10 +243,7 @@ tree_ssa_phiopt_worker (bool do_store_elim, bool do_= hoist_loads, bool early_p) > is likely to perform worse than the well-predicted branc= h. */ > && !predictable_edge_p (EDGE_SUCC (bb, 0)) > && !predictable_edge_p (EDGE_SUCC (bb, 1))) > - { > - hoist_adjacent_loads (bb, bb1, bb2, bb3); > - continue; > - } > + hoist_adjacent_loads (bb, bb1, bb2, bb3); > } > > gimple_stmt_iterator gsi; > -- > 2.39.1 >