aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bpf/diag-sdiv.c
blob: db0c494a789c9b3ccc4d26cfdd781e7a7cceb5be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Verify signed division does not produce 'sdiv' insn in eBPF.  */
/* { dg-do compile } */
/* { dg-options "-O0" } */

void
foo ()
{
  signed int x = 5;
  signed int y = 2;
  signed int z = x / y;
}
/* { dg-final { scan-assembler-not "sdiv(32)?\t%r" } } */