aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/thumb2-replicated-constant4.c
blob: 24efdcf34e2f56fe1240f59bd672dcc19152e429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Ensure replicated constants don't make things worse.  */
/* { dg-options "-mthumb -O2" } */
/* { dg-require-effective-target arm_thumb2_ok } */

int
foo1 (int a)
{
  /* It might be tempting to use 0x01000100, but it wouldn't help. */
  return a + 0x01f001e0;
}

/* { dg-final { scan-assembler "add.*#32505856" } } */
/* { dg-final { scan-assembler "add.*#480" } } */

int
foo2 (int a)
{
  return a + 0x0f100e10;
}

/* { dg-final { scan-assembler "add.*#252706816" } } */
/* { dg-final { scan-assembler "add.*#3600" } } */