From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28558 invoked by alias); 16 Jun 2016 15:51:53 -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 28544 invoked by uid 89); 16 Jun 2016 15:51:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 16 Jun 2016 15:51:52 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECF41486A2; Thu, 16 Jun 2016 15:51:50 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-111.phx2.redhat.com [10.3.116.111]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5GFpoqe009970; Thu, 16 Jun 2016 11:51:50 -0400 Subject: Re: [PATCH, vec-tails 07/10] Support loop epilogue combining To: Ilya Enkovich , Richard Biener References: <20160519194450.GH40563@msticlxl57.ims.intel.com> Cc: GCC Patches From: Jeff Law Message-ID: <6bc81b5f-6e47-6e23-ffe7-56ca898ce3f5@redhat.com> Date: Thu, 16 Jun 2016 15:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg01254.txt.bz2 On 06/16/2016 09:41 AM, Ilya Enkovich wrote: > 2016-06-15 14:44 GMT+03:00 Richard Biener : >> On Thu, May 19, 2016 at 9:44 PM, Ilya Enkovich wrote: >>> Hi, >>> >>> This patch introduces support for loop epilogue combining. This includes >>> support in cost estimation and all required changes required to mask >>> vectorized loop. >> >> I wonder why you compute a minimum number of iterations to make masking >> of the vectorized body profitable rather than a maximum number of iterations. >> >> I'd say masking the vectorized loop is profitable if niter/vf * >> masking-overhead < epilogue-cost. >> Masking the epilogue is profitable if vectorizing the epilogue with >> masking is profitable. >> >> Am I missing something? > > We don't have two versions of vectorized loop. The choice is between vector > and scalar loop and in this case minimum number of iterations is what we need. > Generating two vectorized loop versions would be something new to vectorizer. What I think Richi is saying is that we have to multiply the cost of the masking overhead by the number of iterations of vectorized loop to determine the cost of masking -- the more loop iterations we have, the greater the cost of masking in the loop becomes and those costs may be higher than the normal epilogue sequence. Jeff