1 #define zext(X) ((unsigned long long) (X))
2 #define MAX (1ULL << 32)
3
4 #define TEST(X,OP,VAL) (zext(X) OP (VAL)) == (X OP (VAL))
5
zext_ltu_0(unsigned int x)6 int zext_ltu_0(unsigned int x) { return TEST(x, < , MAX); }
zext_ltu_m(unsigned int x)7 int zext_ltu_m(unsigned int x) { return TEST(x, < , MAX - 1); }
zext_lte_0(unsigned int x)8 int zext_lte_0(unsigned int x) { return TEST(x, <=, MAX); }
zext_lte_m(unsigned int x)9 int zext_lte_m(unsigned int x) { return TEST(x, <=, MAX - 1); }
zext_gte_0(unsigned int x)10 int zext_gte_0(unsigned int x) { return TEST(x, >=, MAX); }
zext_gte_m(unsigned int x)11 int zext_gte_m(unsigned int x) { return TEST(x, >=, MAX - 1); }
zext_gtu_0(unsigned int x)12 int zext_gtu_0(unsigned int x) { return TEST(x, > , MAX); }
zext_gtu_m(unsigned int x)13 int zext_gtu_m(unsigned int x) { return TEST(x, > , MAX - 1); }
14
15 /*
16 * check-name: cmp-zext-uimm0
17 * check-command: test-linearize -Wno-decl $file
18 *
19 * check-output-ignore
20 * check-output-returns: 1
21 */
22