PR c++/67273
[official-gcc.git] / gcc / testsuite / gcc.target / arm / negdi-1.c
blobc9bef049c4a467288e90c96abe1a34e2d1e028fc
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm32 } */
3 /* { dg-options "-O2" } */
5 signed long long extendsidi_negsi (signed int x)
7 return -x;
11 Expected output:
12 rsb r0, r0, #0
13 mov r1, r0, asr #31
15 /* { dg-final { scan-assembler-times "rsb" 1 { target { arm_nothumb } } } } */
16 /* { dg-final { scan-assembler-times "negs\\t" 1 { target { ! { arm_nothumb } } } } } */
17 /* { dg-final { scan-assembler-times "asr" 1 } } */