2 /* { dg-do compile } */
3 /* { dg-options "-O2 -masm=att" } */
6 f1 (unsigned int a
, unsigned int b
)
8 unsigned int i
= __builtin_add_overflow (a
, b
, &a
);
13 f2 (unsigned int a
, unsigned int b
)
15 unsigned int i
= __builtin_add_overflow (a
, b
, &a
);
21 f3 (unsigned long long a
, unsigned long long b
)
23 unsigned long long i
= __builtin_add_overflow (a
, b
, &a
);
28 f4 (unsigned long long a
, unsigned long long b
)
30 unsigned long long i
= __builtin_add_overflow (a
, b
, &a
);
35 f5 (unsigned int a
, unsigned int b
)
37 unsigned int i
= __builtin_add_overflow (a
, b
, &a
);
42 f6 (unsigned int a
, unsigned int b
)
44 unsigned int i
= __builtin_add_overflow (a
, b
, &a
);
49 /* { dg-final { scan-assembler-times "adcl\t\\\$0," 1 { target ia32 } } } */
50 /* { dg-final { scan-assembler-times "sbbl\t\\\$0," 1 { target ia32 } } } */
51 /* { dg-final { scan-assembler-times "adcl\t\\\$0," 2 { target { ! ia32 } } } } */
52 /* { dg-final { scan-assembler-times "sbbl\t\\\$0," 2 { target { ! ia32 } } } } */
53 /* { dg-final { scan-assembler-times "adcq\t\\\$0," 1 { target { ! ia32 } } } } */
54 /* { dg-final { scan-assembler-times "sbbq\t\\\$0," 1 { target { ! ia32 } } } } */