summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr67317-1.c
blob: 7db4e5f31a778031c77fdb321b64fefba3ea944a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR target/67317 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

typedef unsigned int u32;

u32 testcarry_u32 (u32 a, u32 b, u32 c, u32 d)
{
  u32 result0, result1;

  __builtin_ia32_addcarryx_u32
    (__builtin_ia32_addcarryx_u32 (0, a, c, &result0), b, d, &result1);

  return result0 ^ result1;
}

/* { dg-final { scan-assembler-not "addb" } } */
/* { dg-final { scan-assembler-not "setn?c" } } */