From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7877) id C01D3385828E; Fri, 17 Nov 2023 02:21:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C01D3385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700187681; bh=9jv3DZfNOrKLv18+c+04m71P23uYqSwZUjjGTOHeih0=; h=From:To:Subject:Date:From; b=Cin0N6wsn+5wiAWnJySLRmqHJ8zj+0isRVOlG0AhO7EeexmfSY+aGTRxynW7/YcK9 o31E8rDFIY4PZUOW1+pD5jiBI0qcQ8YdvF3CX7OAEYWC+HqNebeCZb0ts1MbBuB0nV rhxviBg6YjUBKcEM/5DZu5IWlAwN53j44F+kOIM0= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: LuluCheng To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-5545] LoongArch: Increase cost of vector aligned store/load. X-Act-Checkin: gcc X-Git-Author: Jiahao Xu X-Git-Refname: refs/heads/master X-Git-Oldrev: fa5af4fc9924f5cd0322c0de7d0b99b83dc7d8f2 X-Git-Newrev: 37183018134049a70482a59b8f12180946ab8fa4 Message-Id: <20231117022121.C01D3385828E@sourceware.org> Date: Fri, 17 Nov 2023 02:21:21 +0000 (GMT) List-Id: https://gcc.gnu.org/g:37183018134049a70482a59b8f12180946ab8fa4 commit r14-5545-g37183018134049a70482a59b8f12180946ab8fa4 Author: Jiahao Xu Date: Thu Nov 16 16:44:36 2023 +0800 LoongArch: Increase cost of vector aligned store/load. Based on SPEC2017 performance evaluation results, it's better to make them equal to the cost of unaligned store/load so as to avoid odd alignment peeling. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_builtin_vectorization_cost): Adjust. Diff: --- gcc/config/loongarch/loongarch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 738911661d7..d05743bec87 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -3893,11 +3893,9 @@ loongarch_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, case scalar_stmt: case scalar_load: case vector_stmt: - case vector_load: case vec_to_scalar: case scalar_to_vec: case scalar_store: - case vector_store: return 1; case vec_promote_demote: @@ -3905,6 +3903,8 @@ loongarch_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, return LASX_SUPPORTED_MODE_P (mode) && !LSX_SUPPORTED_MODE_P (mode) ? 2 : 1; + case vector_load: + case vector_store: case unaligned_load: case unaligned_store: return 2;