2 /* { dg-options "-O2 --save-temps" } */
4 extern void abort (void);
8 negs_si_test1 (int a
, int b
, int c
)
12 /* { dg-final { scan-assembler "negs\tw\[0-9\]+, w\[0-9\]+" } } */
21 negs_si_test3 (int a
, int b
, int c
)
25 /* { dg-final { scan-assembler "negs\tw\[0-9\]+, w\[0-9\]+, lsl 3" } } */
33 typedef long long s64
;
37 negs_di_test1 (s64 a
, s64 b
, s64 c
)
41 /* { dg-final { scan-assembler "negs\tx\[0-9\]+, x\[0-9\]+" } } */
50 negs_di_test3 (s64 a
, s64 b
, s64 c
)
54 /* { dg-final { scan-assembler "negs\tx\[0-9\]+, x\[0-9\]+, lsl 3" } } */
67 x
= negs_si_test1 (2, 12, 5);
71 x
= negs_si_test1 (1, 2, 32);
75 x
= negs_si_test3 (13, 14, 5);
79 x
= negs_si_test3 (15, 21, 2);
83 y
= negs_di_test1 (0x20202020ll
,
86 if (y
!= 0x62636263ll
)
89 y
= negs_di_test1 (0x1010101010101ll
,
92 if (y
!= 0x6565656565656ll
)
95 y
= negs_di_test3 (0x62523781ll
,
98 if (y
!= 0xfffffffd553d4edbll
)
101 y
= negs_di_test3 (0x763526268ll
,
104 if (y
!= 0xfffffffb1b1b1b1bll
)