blob: 81fcda8514009d9af191df043812f4f8cb2888f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
typedef unsigned int uint;
typedef signed int sint;
uint fact_xor_shl(uint a, uint b, uint s)
{
return ((a << s) ^ (b << s)) == ((a ^ b) << s);
}
uint fact_xor_lsr(uint a, uint b, uint s)
{
return ((a >> s) ^ (b >> s)) == ((a ^ b) >> s);
}
sint fact_xor_asr(sint a, sint b, sint s)
{
return ((a >> s) ^ (b >> s)) == ((a ^ b) >> s);
}
/*
* check-name: fact-xor-shift
* check-command: test-linearize -Wno-decl $file
* check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1
*/
|