From patchwork Tue Apr 12 10:10:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 609331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qkjPW6r6Mz9t45 for ; Tue, 12 Apr 2016 20:10:44 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=YOYwh9EA; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=XKapmrmt5i9gVI/WzkHHTF4cJOMW+oIi8er+5bF8hv8crapiA2 SBep0qfgagtoUULPlF/1pyNmK/vTSEYkgM9Bi04Dmn6X5/d4VuCq0ASsv/MYW67i q2Xub/TzmAhD5pc9/9ytk93CtxrIyno1L2FhC2wOxYKNyDHYobbQNvuSI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=x7rS5pYjpBZIhpOLlnia29ngq2Y=; b=YOYwh9EAFWflgWgiD/em L2EVnQMTA6J7HDZwXauItAvRk5GRLU7sU/g2n6ZrFJ7FcwwnL7NUsJZR0+9xvtxY uAjCEzl8Byc9ev2va8nAlkJeMk4nQDlb+SqvCyv4JFYz7YwjSICvcQSPjcp2XOJL HalZUVrYbQ+a+t2pxOPzl9U= Received: (qmail 56196 invoked by alias); 12 Apr 2016 10:10:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 53814 invoked by uid 89); 12 Apr 2016 10:10:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=unswitching, ARRAY_REF, array_ref, estimates X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 12 Apr 2016 10:10:22 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6FCEDABBF; Tue, 12 Apr 2016 10:10:17 +0000 (UTC) To: GCC Patches Cc: Jan Hubicka , Richard Biener , Jakub Jelinek From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Revert r234572 (aka PR testsuite/70577) Message-ID: <570CC98A.4040505@suse.cz> Date: Tue, 12 Apr 2016 12:10:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 X-IsSubscribed: yes Hello. As release managers agreed on IRC, following patch reverts r234572 which introduced new PR testsuite/70577. I've been running bootstrap & regression tests on x86_64-linux-gnu. Ready to be installed after it finishes? Thanks, Martin From 978ddfeada20e5597767df120e5d65eef1115c1b Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 12 Apr 2016 12:03:46 +0200 Subject: [PATCH] Revert r234572 (aka PR testsuite/70577) gcc/ChangeLog: 2016-04-12 Martin Liska Revert 2016-03-30 Jan Hubicka * tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int. (tree_unswitch_outer_loop): Likewise. * tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise. * tree-vect-loop.c (vect_analyze_loop_2): Likewise. --- gcc/tree-ssa-loop-ivopts.c | 6 +----- gcc/tree-ssa-loop-niter.c | 9 +++++---- gcc/tree-ssa-loop-unswitch.c | 4 ---- gcc/tree-vect-loop.c | 2 -- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 7be4f16..a016e9f 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -121,11 +121,7 @@ avg_loop_niter (struct loop *loop) { HOST_WIDE_INT niter = estimated_stmt_executions_int (loop); if (niter == -1) - { - niter = max_stmt_executions_int (loop); - if (niter == -1 || niter > AVG_LOOP_NITER (loop)) - return AVG_LOOP_NITER (loop); - } + return AVG_LOOP_NITER (loop); return niter; } diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index c93e563..81689fc 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -3115,6 +3115,7 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta) tree low, high, type, next; bool sign, upper = true, at_end = false; struct loop *loop = data->loop; + bool reliable = true; if (TREE_CODE (base) != ARRAY_REF) return true; @@ -3186,14 +3187,14 @@ idx_infer_loop_bounds (tree base, tree *idx, void *dta) && tree_int_cst_compare (next, high) <= 0) return true; - /* If access is not executed on every iteration, we must ensure that overlow - may not make the access valid later. */ + /* If access is not executed on every iteration, we must ensure that overlow may + not make the access valid later. */ if (!dominated_by_p (CDI_DOMINATORS, loop->latch, gimple_bb (data->stmt)) && scev_probably_wraps_p (initial_condition_in_loop_num (ev, loop->num), step, data->stmt, loop, true)) - upper = false; + reliable = false; - record_nonwrapping_iv (loop, init, step, data->stmt, low, high, false, upper); + record_nonwrapping_iv (loop, init, step, data->stmt, low, high, reliable, upper); return true; } diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 77acd66..dd6fd01 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -223,8 +223,6 @@ tree_unswitch_single_loop (struct loop *loop, int num) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); - if (iterations < 0) - iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) @@ -441,8 +439,6 @@ tree_unswitch_outer_loop (struct loop *loop) /* If the loop is not expected to iterate, there is no need for unswitching. */ iterations = estimated_loop_iterations_int (loop); - if (iterations < 0) - iterations = max_loop_iterations_int (loop); if (iterations >= 0 && iterations <= 1) { if (dump_file && (dump_flags & TDF_DETAILS)) diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index f977ee9..d813b86 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2063,8 +2063,6 @@ start_over: estimated_niter = estimated_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo)); - if (estimated_niter != -1) - estimated_niter = max_niter; if (estimated_niter != -1 && ((unsigned HOST_WIDE_INT) estimated_niter <= MAX (th, (unsigned)min_profitable_estimate))) -- 2.8.1