aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/riscv/switch-si.c
blob: de4d68f4d0e969dea5267338fec8bcbfab782d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2" } */

/* Test for do_tablejump patch.  */
extern void asdf(int);
void foo(int x) {
  switch (x) {
  case 0: asdf(10); break;
  case 1: asdf(11); break;
  case 2: asdf(12); break;
  case 3: asdf(13); break;
  case 4: asdf(14); break;
  }
}
/* { dg-final { scan-assembler-not "srli" } } */