aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr55303-3.c
blob: 57c2f403e7165d4953bcee9eeca8127b4b143377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Verify that the special case (umin (reg const_int 1)) results in the
   expected instruction sequence on SH2A.  */
/* { dg-do compile }  */
/* { dg-options "-O2" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
/* { dg-final { scan-assembler-times "tst" 1 } } */
/* { dg-final { scan-assembler-times "movrt" 1 } } */

unsigned int
test_00 (unsigned int a)
{
  /* 1x tst
     1x movrt  */
  return a > 1 ? 1 : a;
}