public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Patrick O'Neill <poneill@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8379] RISC-V: Add regression test for vsetvl bug pr113429 Date: Wed, 24 Jan 2024 01:19:27 +0000 (GMT) [thread overview] Message-ID: <20240124011927.BD7BC3858CDA@sourceware.org> (raw) 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; +}
reply other threads:[~2024-01-24 1:19 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240124011927.BD7BC3858CDA@sourceware.org \ --to=poneill@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).