diff options
author | Jiahao Xu <xujiahao@loongson.cn> | 2023-11-16 16:44:36 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2023-11-17 10:18:45 +0800 |
commit | 37183018134049a70482a59b8f12180946ab8fa4 (patch) | |
tree | 664272834bf83d2fb2ea562ac519fbfa4f8584a1 | |
parent | fa5af4fc9924f5cd0322c0de7d0b99b83dc7d8f2 (diff) | |
download | gcc-37183018134049a70482a59b8f12180946ab8fa4.zip gcc-37183018134049a70482a59b8f12180946ab8fa4.tar.gz gcc-37183018134049a70482a59b8f12180946ab8fa4.tar.bz2 |
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.
-rw-r--r-- | gcc/config/loongarch/loongarch.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 7389116..d05743b 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; |