aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/movleq.c
blob: 2c773fe76bb45ac777ea46025662f55ffe6e55e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-do run } */

typedef long int_t;

__attribute__ ((noinline)) int_t
movleq (int_t w, int_t x, int_t y, int_t z)
{
  return w == x ? y : z;
}

int
main (void)
{
  if (movleq (-1L, -1L, 12L, 23L) != 12L)
    return 1;
  if (movleq (-1L, 3L, 12L, 23L) != 23L)
    return 1;
  if (movleq (1L, 3L, 12L, 23L) != 23L)
    return 1;
  if (movleq (3L, 3L, 12L, 23L) != 12L)
    return 1;
  if (movleq (5L, 3L, 12L, 23L) != 23L)
    return 1;
  if (movleq (3L, -1L, 12L, 23L) != 23L)
    return 1;
  if (movleq (3L, 1L, 12L, 23L) != 23L)
    return 1;
  if (movleq (3L, 5L, 12L, 23L) != 23L)
    return 1;
  return 0;
}