2 pr51581-2.c from the execute part of the gcc torture tests.
13 /* PR tree-optimization/51581 */
14 /* { dg-require-effective-target int32plus } */
16 #ifndef __SDCC_pdk14 // Lack of memory
20 unsigned int b
[N
], d
[N
];
26 for (i
= 0; i
< N
; i
++)
34 for (i
= 0; i
< N
; i
++)
42 for (i
= 0; i
< N
; i
++)
50 for (i
= 0; i
< N
; i
++)
58 for (i
= 0; i
< N
; i
++)
66 for (i
= 0; i
< N
; i
++)
70 #if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
75 for (i
= 0; i
< N
; i
++)
77 int x
= (int) ((unsigned long long) (a
[i
] * 0x55555556LL
) >> 32) - (a
[i
] >> 31);
86 for (i
= 0; i
< N
; i
++)
88 unsigned int x
= ((unsigned int) ((b
[i
] * 0xaaaaaaabULL
) >> 32) >> 1);
97 for (i
= 0; i
< N
; i
++)
99 int x
= (((int) ((unsigned long long) (a
[i
] * 0x38e38e39LL
) >> 32)) >> 2) - (a
[i
] >> 31);
100 c
[i
] = a
[i
] - x
* 18;
108 for (i
= 0; i
< N
; i
++)
110 unsigned int x
= (unsigned int) ((b
[i
] * 0x38e38e39ULL
) >> 32) >> 2;
111 d
[i
] = b
[i
] - x
* 18;
119 for (i
= 0; i
< N
; i
++)
121 int x
= (((int) ((unsigned long long) (a
[i
] * 0x6bca1af3LL
) >> 32)) >> 3) - (a
[i
] >> 31);
122 c
[i
] = a
[i
] - x
* 19;
130 for (i
= 0; i
< N
; i
++)
132 unsigned int tmp
= (b
[i
] * 0xaf286bcbULL
) >> 32;
133 unsigned int x
= (((b
[i
] - tmp
) >> 1) + tmp
) >> 4;
134 d
[i
] = b
[i
] - x
* 19;
141 testTortureExecute (void)
143 #ifndef __SDCC_pdk14 // Lack of memory
145 for (i
= 0; i
< N
; i
++)
160 for (i
= 0; i
< N
; i
++)
161 if (c
[i
] != a
[i
] % 3 || d
[i
] != b
[i
] % 3)
165 for (i
= 0; i
< N
; i
++)
166 if (c
[i
] != a
[i
] % 18 || d
[i
] != b
[i
] % 18)
170 for (i
= 0; i
< N
; i
++)
171 if (c
[i
] != a
[i
] % 19 || d
[i
] != b
[i
] % 19)
173 #if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
176 for (i
= 0; i
< N
; i
++)
177 if (c
[i
] != a
[i
] % 3 || d
[i
] != b
[i
] % 3)
181 for (i
= 0; i
< N
; i
++)
182 if (c
[i
] != a
[i
] % 18 || d
[i
] != b
[i
] % 18)
186 for (i
= 0; i
< N
; i
++)
187 if (c
[i
] != a
[i
] % 19 || d
[i
] != b
[i
] % 19)