Skip to content

Commit

Permalink
Tests added for XCVhwlp
Browse files Browse the repository at this point in the history
Fix for issue [openhwgroup#89](openhwgroup#89)

Files Changed:

  * gcc/testsuite/gcc.target/riscv/cv-hwlp-split-fail.c: New test.
  * gcc/testsuite/gcc.target/riscv/cv-hwlp-ui12-fail.c: New test.
  • Loading branch information
Mary Bennett committed Jan 25, 2024
1 parent 8384cd2 commit 113b324
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gcc/testsuite/gcc.target/riscv/cv-hwlp-split-fail.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* { dg-do compile } */
/* { dg-options "-march=rv32imc_xcvhwlp -mabi=ilp32 -O2" } */

char *a;
int b, c;

int
foo ()
{
char e = 0;
for (; e < 6; e++)
a[b] |= a[e] |= a[b] |= a[c + e >> 4 * b] |= 80 >> e + 1;
}
35 changes: 35 additions & 0 deletions gcc/testsuite/gcc.target/riscv/cv-hwlp-ui12-fail.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* { dg-do compile } */
/* { dg-options "-march=rv32imc_xcvhwlp -mabi=ilp32 -O2" } */

int *c;
int d[12];
int e;
int b ();

int
bar ()
{
volatile int a = b ();
}

int
foo ()
{
short g, h;
for (; e;)
{
g = 0;
for (; g < 8; g++)
{
h = 0;
for (; h < 4; h++)
d[h] = c[h] = d[0];
}
}
}

int
b ()
{
return foo();
}

0 comments on commit 113b324

Please sign in to comment.