public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add TARGET_MIN_VLEN_OPTS to fix the build
@ 2023-10-12 22:01 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-10-12 22:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bd163b54d95e2df7b2bf435c10b5c6734ae7affb

commit bd163b54d95e2df7b2bf435c10b5c6734ae7affb
Author: Kito Cheng <kito.cheng@sifive.com>
Date:   Wed Oct 11 16:18:00 2023 -0700

    RISC-V: Add TARGET_MIN_VLEN_OPTS to fix the build
    
    gcc/ChangeLog:
    
            * config/riscv/riscv-opts.h (TARGET_MIN_VLEN_OPTS): New.
    
    (cherry picked from commit 06f36c1d83a7e8b6da47d3c5b325a963baee6aab)

Diff:
---
 gcc/config/riscv/riscv-opts.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h
index e7c6b75c5ea..31ee42dea6b 100644
--- a/gcc/config/riscv/riscv-opts.h
+++ b/gcc/config/riscv/riscv-opts.h
@@ -112,6 +112,12 @@ enum riscv_entity
    ? 0 \
    : 32 << (__builtin_popcount (riscv_zvl_flags) - 1))
 
+/* Same as TARGET_MIN_VLEN, but take an OPTS as gcc_options.  */
+#define TARGET_MIN_VLEN_OPTS(opts)                                             \
+  ((opts->x_riscv_zvl_flags == 0)                                              \
+     ? 0                                                                       \
+     : 32 << (__builtin_popcount (opts->x_riscv_zvl_flags) - 1))
+
 /* We only enable VLS modes for VLA vectorization since fixed length VLMAX mode
    is the highest priority choice and should not conflict with VLS modes.  */
 #define TARGET_VECTOR_VLS                                                      \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-12 22:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 22:01 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add TARGET_MIN_VLEN_OPTS to fix the build Jeff Law

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).