public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pan Li <panli@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-3614] RISC-V: Enable VECT_COMPARE_COSTS by default Date: Fri, 1 Sep 2023 11:02:24 +0000 (GMT) [thread overview] Message-ID: <20230901110224.D77C43857C4F@sourceware.org> (raw) https://gcc.gnu.org/g:5f2098cce6c75117927fef317c714dd2088b0189 commit r14-3614-g5f2098cce6c75117927fef317c714dd2088b0189 Author: Juzhe-Zhong <juzhe.zhong@rivai.ai> Date: Fri Sep 1 07:10:00 2023 +0800 RISC-V: Enable VECT_COMPARE_COSTS by default since we have added COST framework, we by default enable VECT_COMPARE_COSTS. Also, add 16/32/64 to provide more choices for COST comparison. This patch doesn't change any behavior from the current testsuite since we are using default COST model. gcc/ChangeLog: * config/riscv/riscv-v.cc (autovectorize_vector_modes): Enable VECT_COMPARE_COSTS by default. Diff: --- gcc/config/riscv/riscv-v.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index 6228ff3d92e9..c8ad96f44d5e 100644 --- a/gcc/config/riscv/riscv-v.cc +++ b/gcc/config/riscv/riscv-v.cc @@ -2173,7 +2173,7 @@ autovectorize_vector_modes (vector_modes *modes, bool) full vectors for wider elements. - full_size / 8: Try using 64-bit containers for all element types. */ - static const int rvv_factors[] = {1, 2, 4, 8}; + static const int rvv_factors[] = {1, 2, 4, 8, 16, 32, 64}; for (unsigned int i = 0; i < sizeof (rvv_factors) / sizeof (int); i++) { poly_uint64 units; @@ -2183,12 +2183,8 @@ autovectorize_vector_modes (vector_modes *modes, bool) modes->safe_push (mode); } } - unsigned int flag = 0; if (TARGET_VECTOR_VLS) { - /* Enable VECT_COMPARE_COSTS between VLA modes VLS modes for scalable - auto-vectorization. */ - flag |= VECT_COMPARE_COSTS; /* Push all VLSmodes according to TARGET_MIN_VLEN. */ unsigned int i = 0; unsigned int base_size = TARGET_MIN_VLEN * riscv_autovec_lmul / 8; @@ -2201,7 +2197,8 @@ autovectorize_vector_modes (vector_modes *modes, bool) size = base_size / (1U << i); } } - return flag; + /* Enable LOOP_VINFO comparison in COST model. */ + return VECT_COMPARE_COSTS; } /* If the given VECTOR_MODE is an RVV mode, first get the largest number
reply other threads:[~2023-09-01 11:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230901110224.D77C43857C4F@sourceware.org \ --to=panli@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).