From: Pan Li <[email protected]>
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/rvv.exp: Add sub-folder group_overlap.
* gcc.target/riscv/rvv/autovec/group_overlap/group_overlap.h: New test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-0.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-1.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-0.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-1.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-0.c: New test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-1.c: New test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-0.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-1.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-0.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-1.c: New
test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-0.c: New test.
* gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-1.c: New test.
Signed-off-by: Pan Li <[email protected]>
---
.../rvv/autovec/group_overlap/group_overlap.h | 79 +++++++++++++++++++
.../autovec/group_overlap/vzext_vf2-i16-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-i16-1.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-i32-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-i32-1.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-i8-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-i8-1.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u16-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u16-1.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u32-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u32-1.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u8-0.c | 31 ++++++++
.../autovec/group_overlap/vzext_vf2-u8-1.c | 31 ++++++++
gcc/testsuite/gcc.target/riscv/rvv/rvv.exp | 2 +
14 files changed, 453 insertions(+)
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/group_overlap.h
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-1.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-1.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-1.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-1.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-1.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-0.c
create mode 100644
gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-1.c
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/group_overlap.h
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/group_overlap.h
new file mode 100644
index 00000000000..571a143f763
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/group_overlap.h
@@ -0,0 +1,79 @@
+#ifndef HAVE_DEFINED_GROUP_OVERLAP_H
+#define HAVE_DEFINED_GROUP_OVERLAP_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <riscv_vector.h>
+
+#define LOOP_UNARY_BODY_X16(NT, WT, LD_F, OUT_F, ST_F, OUT, START, VL) \
+ NT vs0 = LD_F ((void *)START, VL); START += VL; \
+ NT vs1 = LD_F ((void *)START, VL); START += VL; \
+ NT vs2 = LD_F ((void *)START, VL); START += VL; \
+ NT vs3 = LD_F ((void *)START, VL); START += VL; \
+ NT vs4 = LD_F ((void *)START, VL); START += VL; \
+ NT vs5 = LD_F ((void *)START, VL); START += VL; \
+ NT vs6 = LD_F ((void *)START, VL); START += VL; \
+ NT vs7 = LD_F ((void *)START, VL); START += VL; \
+ NT vs8 = LD_F ((void *)START, VL); START += VL; \
+ NT vs9 = LD_F ((void *)START, VL); START += VL; \
+ NT vs10 = LD_F ((void *)START, VL); START += VL; \
+ NT vs11 = LD_F ((void *)START, VL); START += VL; \
+ NT vs12 = LD_F ((void *)START, VL); START += VL; \
+ NT vs13 = LD_F ((void *)START, VL); START += VL; \
+ NT vs14 = LD_F ((void *)START, VL); START += VL; \
+ NT vs15 = LD_F ((void *)START, VL); START += VL; \
+ \
+ asm volatile("nop" ::: "memory"); \
+ \
+ WT vd0 = OUT_F (vs0, VL); \
+ WT vd1 = OUT_F (vs1, VL); \
+ WT vd2 = OUT_F (vs2, VL); \
+ WT vd3 = OUT_F (vs3, VL); \
+ WT vd4 = OUT_F (vs4, VL); \
+ WT vd5 = OUT_F (vs5, VL); \
+ WT vd6 = OUT_F (vs6, VL); \
+ WT vd7 = OUT_F (vs7, VL); \
+ WT vd8 = OUT_F (vs8, VL); \
+ WT vd9 = OUT_F (vs9, VL); \
+ WT vd10 = OUT_F (vs10, VL); \
+ WT vd11 = OUT_F (vs11, VL); \
+ WT vd12 = OUT_F (vs12, VL); \
+ WT vd13 = OUT_F (vs13, VL); \
+ WT vd14 = OUT_F (vs14, VL); \
+ WT vd15 = OUT_F (vs15, VL); \
+ \
+ asm volatile("nop" ::: "memory"); \
+ \
+ ST_F ((void *)out, vd0, VL); OUT += VL; \
+ ST_F ((void *)out, vd1, VL); OUT += VL; \
+ ST_F ((void *)out, vd2, VL); OUT += VL; \
+ ST_F ((void *)out, vd3, VL); OUT += VL; \
+ ST_F ((void *)out, vd4, VL); OUT += VL; \
+ ST_F ((void *)out, vd5, VL); OUT += VL; \
+ ST_F ((void *)out, vd6, VL); OUT += VL; \
+ ST_F ((void *)out, vd7, VL); OUT += VL; \
+ ST_F ((void *)out, vd8, VL); OUT += VL; \
+ ST_F ((void *)out, vd9, VL); OUT += VL; \
+ ST_F ((void *)out, vd10, VL); OUT += VL; \
+ ST_F ((void *)out, vd11, VL); OUT += VL; \
+ ST_F ((void *)out, vd12, VL); OUT += VL; \
+ ST_F ((void *)out, vd13, VL); OUT += VL; \
+ ST_F ((void *)out, vd14, VL); OUT += VL; \
+ ST_F ((void *)out, vd15, VL); OUT += VL; \
+
+#define DEF_GROUP_OVERLAP_UNARY_0(VL_F, NT, WT, LD_F, OUT_F, ST_F, NAME, \
+ LOOP_BODY) \
+ void test_group_overlap_##NAME##_##NT##_unary_0(uint8_t *data, \
+ uint8_t *out, \
+ size_t limit) \
+ { \
+ uint8_t *start = data; \
+ uint8_t *end = data + limit; \
+ size_t vl = VL_F (); \
+ \
+ while (start < end) { \
+ LOOP_BODY (NT, WT, LD_F, OUT_F, ST_F, out, start, vl); \
+ } \
+ }
+
+#endif
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-0.c
new file mode 100644
index 00000000000..b5c595c0931
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e16m1,
+ vint16m1_t,
+ vint32m2_t,
+ __riscv_vle16_v_i16m1,
+ __riscv_vsext_vf2_i32m2,
+ __riscv_vse32_v_i32m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v6,v7} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-1.c
new file mode 100644
index 00000000000..228245f2b2a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i16-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e16m1,
+ vint16mf2_t,
+ vint32m1_t,
+ __riscv_vle16_v_i16mf2,
+ __riscv_vsext_vf2_i32m1,
+ __riscv_vse32_v_i32m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-0.c
new file mode 100644
index 00000000000..15b58c29f4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e32m1,
+ vint32m1_t,
+ vint64m2_t,
+ __riscv_vle32_v_i32m1,
+ __riscv_vsext_vf2_i64m2,
+ __riscv_vse64_v_i64m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v6,v7} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-1.c
new file mode 100644
index 00000000000..c4857ff8e62
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i32-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e32m1,
+ vint32mf2_t,
+ vint64m1_t,
+ __riscv_vle32_v_i32mf2,
+ __riscv_vsext_vf2_i64m1,
+ __riscv_vse64_v_i64m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-0.c
new file mode 100644
index 00000000000..46bbc4f7000
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e8m1,
+ vint8m1_t,
+ vint16m2_t,
+ __riscv_vle8_v_i8m1,
+ __riscv_vsext_vf2_i16m2,
+ __riscv_vse16_v_i16m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v6,v7} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vsext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-1.c
new file mode 100644
index 00000000000..057132f7b78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-i8-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e8m1,
+ vint8mf2_t,
+ vint16m1_t,
+ __riscv_vle8_v_i8mf2,
+ __riscv_vsext_vf2_i16m1,
+ __riscv_vse16_v_i16m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-0.c
new file mode 100644
index 00000000000..c204b558778
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e16m1,
+ vuint16m1_t,
+ vuint32m2_t,
+ __riscv_vle16_v_u16m1,
+ __riscv_vzext_vf2_u32m2,
+ __riscv_vse32_v_u32m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v6,v7} 1 } } g/
+g* { dg-final { scan-assembler-times {vzext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-1.c
new file mode 100644
index 00000000000..6808258ac33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u16-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e16m1,
+ vuint16mf2_t,
+ vuint32m1_t,
+ __riscv_vle16_v_u16mf2,
+ __riscv_vzext_vf2_u32m1,
+ __riscv_vse32_v_u32m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-0.c
new file mode 100644
index 00000000000..48053232f4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e32m1,
+ vuint32m1_t,
+ vuint64m2_t,
+ __riscv_vle32_v_u32m1,
+ __riscv_vzext_vf2_u64m2,
+ __riscv_vse64_v_u64m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v6,v7} 1 } } g/
+g* { dg-final { scan-assembler-times {vzext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-1.c
new file mode 100644
index 00000000000..67295f3337a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u32-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e32m1,
+ vuint32mf2_t,
+ vuint64m1_t,
+ __riscv_vle32_v_u32mf2,
+ __riscv_vzext_vf2_u64m1,
+ __riscv_vse64_v_u64m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-0.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-0.c
new file mode 100644
index 00000000000..2bc45ba6d8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-0.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e8m1,
+ vuint8m1_t,
+ vuint16m2_t,
+ __riscv_vle8_v_u8m1,
+ __riscv_vzext_vf2_u16m2,
+ __riscv_vse16_v_u16m2,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v0,v1} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v2,v3} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v4,v5} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v6,v7} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v8,v9} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v10,v11} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v12,v13} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v14,v15} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v16,v17} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v18,v19} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v20,v21} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v22,v23} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v24,v25} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v26,v27} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v28,v29} 1 } } */
+/* { dg-final { scan-assembler-times {vzext\.vf2\s+v30,v31} 1 } } */
diff --git
a/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-1.c
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-1.c
new file mode 100644
index 00000000000..81fa973cdd1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/group_overlap/vzext_vf2-u8-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d" } */
+
+#include "group_overlap.h"
+
+DEF_GROUP_OVERLAP_UNARY_0(
+ __riscv_vsetvlmax_e8m1,
+ vuint8mf2_t,
+ vuint16m1_t,
+ __riscv_vle8_v_u8mf2,
+ __riscv_vzext_vf2_u16m1,
+ __riscv_vse16_v_u16m1,
+ vzext_vf,
+ LOOP_UNARY_BODY_X16)
+
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v0,v1} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v2,v3} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v4,v5} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v6,v7} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v8,v9} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v10,v11} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v12,v13} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v14,v15} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v16,v17} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v18,v19} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v20,v21} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v22,v23} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v24,v25} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v26,v27} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v28,v29} } } */
+/* { dg-final { scan-assembler-not {vsext\.vf2\s+v30,v31} } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
index 568179d095e..9a3f05366e8 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
+++ b/gcc/testsuite/gcc.target/riscv/rvv/rvv.exp
@@ -149,6 +149,8 @@ set AUTOVEC_TEST_OPTS [list \
foreach op $AUTOVEC_TEST_OPTS {
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/autovec/vx_vf/*.\[cS\]]]
\
"$op" ""
+ dg-runtest [lsort [glob -nocomplain
$srcdir/$subdir/autovec/group_overlap/*.\[cS\]]] \
+ "$op" ""
}
set POLICY [list {policy} {non-policy} ]
--
2.43.0