2 /* { dg-options "-O2 --save-temps -fno-inline" } */
4 extern void abort (void);
8 adds_ext (s64 a
, int b
, int c
)
19 adds_shift_ext (s64 a
, int b
, int c
)
21 s64 d
= (a
+ ((s64
)b
<< 3));
34 x
= adds_ext (0x13000002ll
, 41, 15);
35 if (x
!= (int)(0x13000002ll
+ 41))
38 x
= adds_ext (0x50505050ll
, -0x50505050ll
, 4);
39 if (x
!= (int)(0x50505050ll
+ 4))
42 x
= adds_ext (0x12121212121ll
, 2, 14);
43 if (x
!= (int)(0x12121212121ll
+ 2))
46 x
= adds_shift_ext (0x123456789ll
, 4, 12);
47 if (x
!= (int)(0x123456789ll
+ (4 << 3)))
50 x
= adds_shift_ext (-(0x02020202ll
<< 3), 0x02020202ll
, 8);
51 if (x
!= (int)(8 - (0x02020202ll
<< 3)))
54 x
= adds_shift_ext (0x987987987987ll
, 23, 41);
55 if (x
!= (int)(0x987987987987ll
+ (23 << 3)))
61 /* { dg-final { scan-assembler-times "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, sxtw" 2 } } */