https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111857
Bug ID: 111857 Summary: RISC-V: Failed to vectorize small GNU vector if zvl4096b with fixed-vlmax Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: juzhe.zhong at rivai dot ai Target Milestone: --- typedef char vnx16i __attribute__ ((vector_size (16))); #define MASK_16 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15, 12, 13, 14, 15 vnx16i __attribute__ ((noinline, noclone)) test_1 (vnx16i x, vnx16i y) { return __builtin_shufflevector (x, y, MASK_16); } If we specify it as -march=rv64gcv --param=riscv-autovec-preference=fixed-vlmax. it can vectorize. But failed to vectorize it with -march=rv64gcv_zvl4096b --param=riscv-autovec-preference=fixed-vlmax https://godbolt.org/z/zx816ao5o