From patchwork Fri Dec 9 12:41:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 704448 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 3tZsLr6RH5z9sCZ for ; Fri, 9 Dec 2016 23:42:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XjJAcICY"; 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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=KB7YSlYcqRBTi9agr1p++07P/T/uDgbZROAzrpxh7djFwg/KOSXWL xigwHuPnkCbW9V9D1orL1tNL9zotu8G9OGQ2Wbpbi30k0a6YCydI92/F90xem4QH nn1zcABp9ca7U171i9Ui4kI310jE8G72DXYN5e3mgtgiL6FTfQ7N+M= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=vWclyxVWC2y9MeCqTkoo/C/XwaM=; b=XjJAcICY5RNrZOdOSOXj TKSabeGh9ScsAE5uD5Fv/uICgcB47SPxuyjnf9lx6dlP2tXUbSteSYzvrBSELKGz B4WQfb+80AzApXGNDkk7nQDT4rnSqS3pDCErlbP37g4cprJyyyGHP/x3UL79NyYz qc5hk/RVWTYoReY517XnR04= Received: (qmail 1426 invoked by alias); 9 Dec 2016 12:42:01 -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 1391 invoked by uid 89); 9 Dec 2016 12:42:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=cap, Limit 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 ESMTP; Fri, 09 Dec 2016 12:41:50 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8D9C8ABC3 for ; Fri, 9 Dec 2016 12:41:47 +0000 (UTC) Date: Fri, 9 Dec 2016 13:41:47 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR78699 Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Fixing the cost model for large permuted SLP groups broke this due to the excessive amount of garbage we create. A previous fix for this was (ab-)using the cost-model so this one simply makes a hard upper bound for SLP group sizes. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2016-12-09 Richard Biener PR tree-optimization/78699 * tree-vect-data-refs.c (vect_analyze_group_access_1): Limit group size. Index: gcc/tree-vect-data-refs.c =================================================================== --- gcc/tree-vect-data-refs.c (revision 243474) +++ gcc/tree-vect-data-refs.c (working copy) @@ -2390,7 +2416,9 @@ vect_analyze_group_access_1 (struct data if (groupsize == 0) groupsize = count + gaps; - if (groupsize > UINT_MAX) + /* This could be UINT_MAX but as we are generating code in a very + inefficient way we have to cap earlier. See PR78699 for example. */ + if (groupsize > 4096) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,