From patchwork Wed Nov 13 07:31:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1194102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513190-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Kc4Wy87S"; dkim-atps=neutral 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 47Cbs16TMDz9s7T for ; Wed, 13 Nov 2019 18:31:31 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=HgqHP n+KVsHXq/F33P4z9eSZTrkdX6sA7IX+71drSyVkT/mWa0CYV/10vfVlT4IrQOYWS 5T/xDzt1frhUPLxcDhoGB0wns91E9BAla1x1M7P9my7wRcFXpJg6dFjRLlw9OB49 MduSxybpAHSDXMrCYii4bmntKzf22CPK/PKssE= 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:from :subject:to:cc:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=3j5MXZX4iwL 8HhEIFjaPsLxWrLc=; b=Kc4Wy87SnBmeklZ8OhJbJC2O41muBLisSMd7tz9kOeT V/jhFVGfUbSEMGjJYK/wiP1kiRArD5nmU3+X/ZqcNUuLv3eyLiy0GHoDrxOgRsqc JRudYR9Wob8cR3IDIvdLd4ZkkFe+z9WHVttgNyiBLlZNMJSV/AG6BaWJBYEVQXG0 = Received: (qmail 101250 invoked by alias); 13 Nov 2019 07:31:23 -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 101222 invoked by uid 89); 13 Nov 2019 07:31:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Nov 2019 07:31:22 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xAD7O4Z0130540 for ; Wed, 13 Nov 2019 02:31:19 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w8cpq9fyx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 13 Nov 2019 02:31:19 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 13 Nov 2019 07:31:17 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 13 Nov 2019 07:31:15 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAD7VE7257082066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Nov 2019 07:31:14 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0DE2B42049; Wed, 13 Nov 2019 07:31:14 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C0D314203F; Wed, 13 Nov 2019 07:31:12 +0000 (GMT) Received: from kewenlins-mbp.cn.ibm.com (unknown [9.200.147.182]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 13 Nov 2019 07:31:12 +0000 (GMT) From: "Kewen.Lin" Subject: [PATCH, testsuite] Fix PR92464 by adjust test case loop bound To: GCC Patches Cc: Segher Boessenkool , Bill Schmidt Date: Wed, 13 Nov 2019 15:31:11 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 x-cbid: 19111307-0012-0000-0000-000003633291 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19111307-0013-0000-0000-0000219EA54D Message-Id: X-IsSubscribed: yes Hi, As PR92464 shows, the recent vectorization cost adjustment on load insns is responsible for this regression. It leads the profitable min iteration count to change from 19 to 12. The case happens to hit the threshold. By actual runtime performance evaluation, the vectorized version perform on par with non vectorized version (before). So the vectorization on 12 is actually fine. To keep the case sensitive on high peeling cost, this patch is to adjust the loop bound from 16 to 14. Verified on ppc64-redhat-linux (BE P7) and powerpc64le-linux-gnu (LE P8). BR, Kewen ----- gcc/testsuite/ChangeLog 2019-11-13 Kewen Lin PR target/92464 * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust loop bound due to load cost adjustment. diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c index 4a7da2e..1bb064e 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c @@ -4,7 +4,7 @@ #include #include "../../tree-vect.h" -#define N 16 +#define N 14 #define OFF 4 /* Check handling of accesses for which the "initial condition" -