aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/const_anchors.c
blob: 542e2674b123173603e29fd65a951befb1b14f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile { target has_arch_ppc64 } } */
/* { dg-options "-O2" } */

#define C1 0x2351847027482577ULL
#define C2 0x2351847027482578ULL

void __attribute__ ((noinline)) foo (long long *a)
{
  *a++ = C1;
  *a++ = C2;
}

void __attribute__ ((noinline)) foo1 (long long *a, long long b)
{
  *a++ = C1;
  if (b)
    *a++ = C2;
}

/* { dg-final { scan-assembler-times {\maddi\M} 2 } } */