From patchwork Wed Jul 26 23:30:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 794144 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-459093-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oIufrSWm"; 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 3xHrvh6scgz9s7C for ; Thu, 27 Jul 2017 09:30:56 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=BFo567qAxchRKesyR5D6LMBHJ3nf7RzaNXuu8bm1d3XFfb uW3TM3T3YTm5L0Rq/AK9LoFoVdWRnAspYGx813+p33GwMhF+ilGuE71UI2Bipnqk pE8PRZVrLv8D0safh1grmZgqK0cRHMBO10rsGkI/3tQtLh96DjO6LkJ+t0uSE= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=N6X49G4IVgyZH8wqbuTNNbwm/Og=; b=oIufrSWmVXGbJWivkSdt 3P6IN5/tPiAbJ4vnxXrjmO/prR3kxCWBziIHW5qNwdlPErsm4qd6s++0wOKYHxo4 52zc7gCZDYAjr25Tl5k8qEPjnhPTc0rOiNSVwPIF7NEP41WEpa0Bd8EenjDE/hPH MPgJqmW2lHR+m9w/O32v70U= Received: (qmail 24300 invoked by alias); 26 Jul 2017 23:30:44 -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 11248 invoked by uid 89); 26 Jul 2017 23:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1147 X-HELO: mail-wm0-f42.google.com Received: from mail-wm0-f42.google.com (HELO mail-wm0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Jul 2017 23:30:22 +0000 Received: by mail-wm0-f42.google.com with SMTP id t201so85232979wmt.1 for ; Wed, 26 Jul 2017 16:30:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ebv7BTOW54AEfHTOBotQD1tzCQMcO97bZ8KPr/Rstdk=; b=Hk970xqvZnC3c+lgFOv+WFloCAap58FpmtQMhRvhsncYIY26skekb7j+sWE2Il1zJk hp8nXLbUYD6arXvxkcu4BHja7RytCfj9r9dmpCljLK6LCyN5D61ccZfOp/ZYbz1tT7sW 7+PKHbGvSKN6edutYUIp1CjE2q8sGyiKh0JKJrrwWr8MoG5mJIJJoQtKqDarbxwJ5Cc7 PyeBzqVNVDglL0Pm5YcCCHAkyeM/5fyV+3vqpSx1S2/wB+L0RtIKMWhxqBzWUh4c9Yhf uk4BXJilru+BThbpf1pSTscSCLxUG3qcG1ubDIpXVQbr5XG5IlWieZQisc/FxtPeIvUT BcIw== X-Gm-Message-State: AIVw1112EulgvQBFjP25HjSPI5dYZ/E/o494QheFtVpmVFd1a0FEl/v+ 8gJKqD61vjc49OsDt8eyXZVu+XvSjKlj X-Received: by 10.28.17.78 with SMTP id 75mr1853537wmr.63.1501111819602; Wed, 26 Jul 2017 16:30:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.146.100 with HTTP; Wed, 26 Jul 2017 16:30:18 -0700 (PDT) From: Andrew Pinski Date: Wed, 26 Jul 2017 16:30:18 -0700 Message-ID: Subject: [COMMITTED/AARCH64] Improve thunderx_vect_cost some more To: GCC Patches X-IsSubscribed: yes Looked into tuning the cost model for ThunderX 1 and I noticed I had too high cost of the unaligned load/store. This reduces the cost there and now the loops in linpack are able to vectorize and perform the best. Also tested on SPEC CPU 2006 to make sure we don't regress the vectorizer there. Committed as obvious after a bootstrap/test on aarch64-linux-gnu with no regressions. Thanks, Andrew Pinski * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of vec_unalign_load_cost and vec_unalign_store_cost. Index: config/aarch64/aarch64.c =================================================================== --- config/aarch64/aarch64.c (revision 250592) +++ config/aarch64/aarch64.c (working copy) @@ -363,8 +363,8 @@ static const struct cpu_vector_cost thun 2, /* vec_to_scalar_cost */ 2, /* scalar_to_vec_cost */ 3, /* vec_align_load_cost */ - 10, /* vec_unalign_load_cost */ - 10, /* vec_unalign_store_cost */ + 5, /* vec_unalign_load_cost */ + 5, /* vec_unalign_store_cost */ 1, /* vec_store_cost */ 3, /* cond_taken_branch_cost */ 3 /* cond_not_taken_branch_cost */