1typedef unsigned int uint; 2typedef signed int sint; 3 4 5uint fact_and_shl(uint a, uint b, uint s) 6{ 7 return ((a << s) & (b << s)) == ((a & b) << s); 8} 9 10uint fact_and_lsr(uint a, uint b, uint s) 11{ 12 return ((a >> s) & (b >> s)) == ((a & b) >> s); 13} 14 15sint fact_and_asr(sint a, sint b, sint s) 16{ 17 return ((a >> s) & (b >> s)) == ((a & b) >> s); 18} 19 20/* 21 * check-name: fact-and-shift 22 * check-command: test-linearize -Wno-decl $file 23 * 24 * check-output-ignore 25 * check-output-returns: 1 26 */ 27