2 /* { dg-options "-O2 --save-temps -fno-inline" } */
4 extern void abort (void);
7 tst_si_test1 (int a
, int b
, int c
)
11 /* { dg-final { scan-assembler-times "tst\tw\[0-9\]+, w\[0-9\]+" 2 } } */
19 tst_si_test2 (int a
, int b
, int c
)
21 int d
= a
& 0x99999999;
23 /* { dg-final { scan-assembler "tst\tw\[0-9\]+, -1717986919" } } */
31 tst_si_test3 (int a
, int b
, int c
)
35 /* { dg-final { scan-assembler "tst\tw\[0-9\]+, w\[0-9\]+, lsl 3" } } */
42 typedef long long s64
;
45 tst_di_test1 (s64 a
, s64 b
, s64 c
)
49 /* { dg-final { scan-assembler-times "tst\tx\[0-9\]+, x\[0-9\]+" 2 } } */
57 tst_di_test2 (s64 a
, s64 b
, s64 c
)
59 s64 d
= a
& 0xaaaaaaaaaaaaaaaall
;
61 /* { dg-final { scan-assembler "tst\tx\[0-9\]+, -6148914691236517206" } } */
69 tst_di_test3 (s64 a
, s64 b
, s64 c
)
73 /* { dg-final { scan-assembler "tst\tx\[0-9\]+, x\[0-9\]+, lsl 3" } } */
86 x
= tst_si_test1 (29, 4, 5);
90 x
= tst_si_test1 (5, 2, 20);
94 x
= tst_si_test2 (29, 4, 5);
98 x
= tst_si_test2 (1024, 2, 20);
102 x
= tst_si_test3 (35, 4, 5);
106 x
= tst_si_test3 (5, 2, 20);
110 y
= tst_di_test1 (0x130000029ll
,
117 y
= tst_di_test1 (0x5000500050005ll
,
123 y
= tst_di_test2 (0x130000029ll
,
129 y
= tst_di_test2 (0x540004100ll
,
135 y
= tst_di_test3 (0x130000029ll
,
141 y
= tst_di_test3 (0x130002900ll
,