aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/spaceship-int-2.c
blob: 5f7975c1ab446384417cdf6492ae21c5e2034af9 (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
/* { dg-do compile { target int128 } } */
/* { dg-options "-O2 -mzarch -march=z13 -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times {\.SPACESHIP \([^,]+, [^,]+, -1\)} 1 optimized } } */
/* { dg-final { scan-tree-dump-times {\.SPACESHIP \([^,]+, [^,]+, 1\)} 1 optimized } } */
/* { dg-final { scan-assembler-times {\tvecg} 1 } } */
/* { dg-final { scan-assembler-times {\tveclg} 1 } } */
/* { dg-final { scan-assembler-times {\tvchlgs} 2 } } */
/* { dg-final { scan-assembler-times {\tvceqgs} 2 } } */
/* { dg-final { scan-assembler-times {\tlhi} 2 } } */
/* { dg-final { scan-assembler-times {\tloc} 4 } } */

#define TEST(T, U)		\
  int test_##U (T x, T y)	\
  {				\
    if (x == y)			\
      return 0;			\
    else if (x < y)		\
      return -1;		\
    else			\
      return 1;			\
  }

TEST(__int128, sint128)
TEST(unsigned __int128, uint128)