1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3 /* { dg-require-effective-target arm_v8_vfp_ok } */
5 /* Both sdiv and udiv can be used here, so prefer udiv. */
6 int f1 (unsigned char *p
)
11 int f2 (unsigned char *p
, unsigned short x
)
16 int f3 (unsigned char *p
, int x
)
22 int f5 (unsigned char *p
, unsigned short x
)
27 /* This should only generate signed divisions. */
28 int f4 (unsigned char *p
)
33 int f6 (unsigned char *p
, short x
)
38 /* { dg-final { scan-assembler-times "udiv\tr\[0-9\]+, r\[0-9\]+, r\[0-9\]+" 4 } } */
39 /* { dg-final { scan-assembler-times "sdiv\tr\[0-9\]+, r\[0-9\]+, r\[0-9\]+" 2 } } */