aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr51244-2.c
blob: a81ee7ed9d62ec00186acd47a58f14733450dca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Check that when taking the complement of the T bit using the negc
   instruction pattern, the constant -1 is loaded only once.
   On SH2A this test is skipped because the movrt instruction is used
   to get the complement of the T bit.  */
/* { dg-do compile }  */
/* { dg-options "-O1 -mbranch-cost=2" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
/* { dg-final { scan-assembler-times "mov\t#-1" 1 } } */

void
testfunc_00 (int* a, int* b, int c, int d)
{
  b[0] = a[0] != c;
  b[1] = a[1] != d;
  b[2] = a[2] != c;
  b[3] = a[3] != d;
}