From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48991 invoked by alias); 13 Oct 2015 12:38:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 48910 invoked by uid 89); 13 Oct 2015 12:38:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f174.google.com Received: from mail-ob0-f174.google.com (HELO mail-ob0-f174.google.com) (209.85.214.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 13 Oct 2015 12:38:56 +0000 Received: by obbzf10 with SMTP id zf10so12165085obb.2 for ; Tue, 13 Oct 2015 05:38:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.220.227 with SMTP id pz3mr18536484oec.13.1444739934245; Tue, 13 Oct 2015 05:38:54 -0700 (PDT) Received: by 10.76.175.132 with HTTP; Tue, 13 Oct 2015 05:38:54 -0700 (PDT) In-Reply-To: References: Date: Tue, 13 Oct 2015 12:38:00 -0000 Message-ID: Subject: Re: [PATCH PR67909 PR67947] From: "H.J. Lu" To: Yuri Rumyantsev Cc: gcc-patches , Richard Biener , Igor Zamyatin Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01231.txt.bz2 On Tue, Oct 13, 2015 at 4:57 AM, Yuri Rumyantsev wrote: > Hi All, > > Here is a simple patch for unswitching outer loop through guard-edge > hoisting. The check that guard-edge is around the inner loop was > missed. > > Bootstrapping and regression testing did not show new failures. > > Is it OK for trunk? > > ChangeLog: > 2014-10-13 Yuri Rumyantsev > > PR tree-optimization/67909, 67947 > * tree-ssa-loop-unswitch.c (find_loop_guard): Add check that GUARD_EDGE > really skip the inner loop. > > gcc/testsuite/ChangeLog > * gcc.dg/torture/pr67947.c: New test. + /* Guard edge must skip inner loop. */ + if (!dominated_by_p (CDI_DOMINATORS, loop->inner->header, + guard_edge == fe ? te->dest : fe->dest)) ^^^^ It should line up with "CDI_DOMINATORS". + fprintf (dump_file, "Guard edge %d --> %d is not around the loop!\n",guard_edge->src->index,guard_edge->dest->index); Please break lone line. -- H.J.