1 /* PR middle-end/82853 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mno-bmi2 -mtune=generic" } */
4 /* { dg-final { scan-assembler-times "mul\[lq]\t" 7 } } */
5 /* { dg-final { scan-assembler-not "div\[lq]\t" } } */
6 /* { dg-final { scan-assembler-not "lea\[lq]\t\[^\n\r]*,\[^\n\r]*,2\\)" } } */
7
f1(unsigned x)8 unsigned f1 (unsigned x) { return (x % 679U) == 0; }
f2(unsigned x)9 unsigned f2 (unsigned x) { return (x % 1738U) == 0; }
10 void bar (void);
f3(unsigned x)11 void f3 (unsigned x) { if (x % 3 == 0) bar (); }
f4(unsigned x)12 void f4 (unsigned x) { if (x % 3 == 1) bar (); }
f5(unsigned x)13 void f5 (unsigned x) { if (x % 3 == 2) bar (); }
f6(int x)14 int f6 (int x) { return x % 3 == 0; }
f7(int x)15 int f7 (int x) { return x % 6 == 0; }
16