blob: 482408aa90c115ace7f3c3324bbcfeed5222c87f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// canonicalize to == or !=
int cmp_ltu_eq0(unsigned int x) { return (x < 1) == (x == 0); }
int cmp_geu_ne0(unsigned int x) { return (x >= 1) == (x != 0); }
// canonicalize to the smaller value
int cmp_ltu(unsigned int x) { return (x < 256) == (x <= 255); }
int cmp_geu(unsigned int x) { return (x >= 256) == (x > 255); }
/*
* check-name: canonical-cmpu
* check-command: test-linearize -Wno-decl $file
* check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1
*/
|