public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8379] RISC-V: Add regression test for vsetvl bug pr113429
@ 2024-01-24 1:19 Patrick O'Neill
0 siblings, 0 replies; only message in thread
From: Patrick O'Neill @ 2024-01-24 1:19 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:7f7d9c525c694e36ae525ed93ccd5b6ffad0f1d8
commit r14-8379-g7f7d9c525c694e36ae525ed93ccd5b6ffad0f1d8
Author: Patrick O'Neill <patrick@rivosinc.com>
Date: Tue Jan 23 16:36:53 2024 -0800
RISC-V: Add regression test for vsetvl bug pr113429
The reduced testcase for pr113429 (cam4 failure) needed additional
modules so it wasn't committed.
The fuzzer found a c testcase that was also fixed with pr113429's fix.
Adding it as a regression test.
PR target/113429
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/vsetvl/pr113429.c: New test.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
Diff:
---
.../gcc.target/riscv/rvv/vsetvl/pr113429.c | 70 ++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr113429.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr113429.c
new file mode 100644
index 00000000000..05c3eeecb94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr113429.c
@@ -0,0 +1,70 @@
+/* { dg-do run } */
+/* { dg-options "-march=rv64gcv_zvl256b -mabi=lp64d -O3" } */
+
+long a;
+int b, c, d, e, f, g;
+short h, i, j;
+static int k = 3;
+static int l = 6;
+int m[5][7];
+signed char n;
+int *const o = &c;
+
+signed char(p)(signed char p1, signed char q) {
+ return p1 / q;
+}
+
+void s(unsigned p1) {
+ b = (b ^ p1) & 255;
+}
+
+static long t() {
+ long u;
+ signed char v;
+ d = 1;
+ for (; d <= 4; d++) {
+ j = 0;
+ for (; j <= 4; j++) {
+ v = 0;
+ for (; v <= 4; v++) {
+ if (m[v][v])
+ continue;
+ c = 0;
+ for (; c <= 4; c++) {
+ n = 0;
+ for (; n <= 4; n++) {
+ int *w = &e;
+ long r = v;
+ u = r == 0 ? a : a % r;
+ h |= u;
+ *w = g;
+ --m[n][c];
+ f &= *o;
+ }
+ }
+ if (p((i < 3) ^ 9, k))
+ ;
+ else if (v)
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+static char x() {
+ for (;;) {
+ t();
+ if (l)
+ return 0;
+ }
+}
+
+int main() {
+ x();
+ s(e & 255);
+ if (b == 0)
+ return 0;
+ else
+ return 1;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-24 1:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 1:19 [gcc r14-8379] RISC-V: Add regression test for vsetvl bug pr113429 Patrick O'Neill
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).