aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/testsuite/gcc.target/i386/cold-attribute-1.c
blob: db81ee837adf58c5fad48e43f16baf645b14c02a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2" } */
#include <string.h>
static inline
__attribute__ ((cold))
my_cold_memset (void *a, int b,int c)
{
  memset (a,b,c);
}
t(void *a,int b,int c)
{
  if (a)
    my_cold_memset (a,b,40);
}

/* The IF conditional should be predicted as cold and my_cold_memset inlined
   for size expanding memset as rep; stosb.  */
/* { dg-final { scan-assembler "stosb" } } */