gcc/testsuite/gcc.target/aarch64/builtin_saddl.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2" } */ |
| 3 | |
| 4 | extern void overflow_handler (); |
| 5 | |
| 6 | long overflow_add (long x, long y) |
| 7 | { |
| 8 | long r; |
| 9 | |
| 10 | int ovr = __builtin_saddl_overflow (x, y, &r); |
| 11 | if (ovr) |
| 12 | overflow_handler (); |
| 13 | |
| 14 | return r; |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-assembler "adds" } } */ |