public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Add testcase for pr114734
@ 2024-04-30 20:36 Patrick O'Neill
  2024-04-30 22:03 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick O'Neill @ 2024-04-30 20:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: rdapp.gcc, rguenth, Patrick O'Neill

gcc/testsuite/ChangeLog:

PR middle-end/114734

	* gcc.target/riscv/rvv/autovec/pr114734.c: New test.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
Tested on rv64gcv before and after Richard Biener's fix:
4d3a5618de5a949c61605f545f90e81bc0000502
---
 .../gcc.target/riscv/rvv/autovec/pr114734.c   | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114734.c

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114734.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114734.c
new file mode 100644
index 00000000000..b605d992aa1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114734.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-require-effective-target riscv_v } */
+/* { dg-options { -march=rv64gcv_zvl256b -mabi=lp64d -fwhole-program -O3 -mrvv-vector-bits=zvl  } } */
+
+int f[18];
+int g[18];
+int h[18][18][18];
+int a[324];
+long b[18];
+int *i = g;
+int (*j)[18][18] = h;
+int z;
+int main() {
+  for (int m = 0; m < 18; ++m)
+    f[m] = 3;
+  for (int m = 0; m < 18; m += 1)
+    for (int n = 0; n < 18; n += 3) {
+      a[m * 8 + n] = j[m][m][0] ? i[n] : 0;
+      b[n] = f[n] ? -i[m] : 0;
+    }
+  for (long n = 0; n < 8; ++n)
+    z = a[n];
+  if (b[15] != 0)
+    __builtin_abort();
+}
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] RISC-V: Add testcase for pr114734
  2024-04-30 20:36 [PATCH] RISC-V: Add testcase for pr114734 Patrick O'Neill
@ 2024-04-30 22:03 ` Jeff Law
  2024-05-02 16:23   ` [Committed] " Patrick O'Neill
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2024-04-30 22:03 UTC (permalink / raw)
  To: Patrick O'Neill, gcc-patches; +Cc: rdapp.gcc, rguenth



On 4/30/24 2:36 PM, Patrick O'Neill wrote:
> gcc/testsuite/ChangeLog:
> 
> PR middle-end/114734
> 
> 	* gcc.target/riscv/rvv/autovec/pr114734.c: New test.
OK
jeff


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Committed] RISC-V: Add testcase for pr114734
  2024-04-30 22:03 ` Jeff Law
@ 2024-05-02 16:23   ` Patrick O'Neill
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick O'Neill @ 2024-05-02 16:23 UTC (permalink / raw)
  To: Jeff Law, gcc-patches; +Cc: rdapp.gcc, rguenth

On 4/30/24 15:03, Jeff Law wrote:
>
> On 4/30/24 2:36 PM, Patrick O'Neill wrote:
>> gcc/testsuite/ChangeLog:
>>
>> PR middle-end/114734
>>
>>     * gcc.target/riscv/rvv/autovec/pr114734.c: New test.
> OK
> jeff
>
Committed.

Patrick


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-02 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30 20:36 [PATCH] RISC-V: Add testcase for pr114734 Patrick O'Neill
2024-04-30 22:03 ` Jeff Law
2024-05-02 16:23   ` [Committed] " 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).