1 /* We should implement these "if" statements using an "andi" instruction
2 followed by a branch on zero. */
3 /* { dg-mips-options "-O2 -mno-mips16" } */
5 void f1 (int x
) { if (x
& 4) bar (); }
6 void f2 (int x
) { if ((x
>> 2) & 1) bar (); }
7 void f3 (unsigned int x
) { if (x
& 0x10) bar (); }
8 void f4 (unsigned int x
) { if ((x
>> 4) & 1) bar (); }
9 /* { dg-final { scan-assembler "\tandi\t.*\tandi\t.*\tandi\t.*\tandi\t" } } */
10 /* { dg-final { scan-assembler-not "\tsrl\t" } } */
11 /* { dg-final { scan-assembler-not "\tsra\t" } } */