ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/bpf/diag-smod.c

13 lines
256 B
C

/* Verify signed modulo does not produce 'smod' 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 "smod(32)?\t%r" } } */