gcc:
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr55303-3.c
blob57c2f403e7165d4953bcee9eeca8127b4b143377
1 /* Verify that the special case (umin (reg const_int 1)) results in the
2 expected instruction sequence on SH2A. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
6 /* { dg-final { scan-assembler-times "tst" 1 } } */
7 /* { dg-final { scan-assembler-times "movrt" 1 } } */
9 unsigned int
10 test_00 (unsigned int a)
12 /* 1x tst
13 1x movrt */
14 return a > 1 ? 1 : a;