Skip to content

Commit

Permalink
RISC-V: Add TARGET_MIN_VLEN_OPTS to fix the build
Browse files Browse the repository at this point in the history
gcc/ChangeLog:

	* config/riscv/riscv-opts.h (TARGET_MIN_VLEN_OPTS): New.
  • Loading branch information
kito-cheng committed Oct 11, 2023
1 parent a3e50ee commit 06f36c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gcc/config/riscv/riscv-opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 06f36c1

Please sign in to comment.