diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-25 16:03:38 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-05 01:59:06 +0100 |
| commit | 17c0dc05248364ea9b64aa4d997c49a516208d6d (patch) | |
| tree | 069feb65896d5cf9e485f3f08376677c1518ff89 /validation/optim/cmp-zext-uimm1.c | |
| parent | ee854cb92c46b4194f2014332dc856efa2cf250f (diff) | |
| download | sparse-dev-17c0dc05248364ea9b64aa4d997c49a516208d6d.tar.gz | |
cmp: add testcases for the simplification of compares
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/cmp-zext-uimm1.c')
| -rw-r--r-- | validation/optim/cmp-zext-uimm1.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/validation/optim/cmp-zext-uimm1.c b/validation/optim/cmp-zext-uimm1.c new file mode 100644 index 00000000..ffcdaad5 --- /dev/null +++ b/validation/optim/cmp-zext-uimm1.c @@ -0,0 +1,16 @@ +#define zext(X) ((unsigned long long) (X)) +#define BITS ((1ULL << 32) - 1) + +int zext_lt_p(unsigned int x) { return (zext(x) < (BITS + 1)) == 1; } +int zext_le_p(unsigned int x) { return (zext(x) <= (BITS )) == 1; } +int zext_ge_p(unsigned int x) { return (zext(x) >= (BITS + 1)) == 0; } +int zext_gt_p(unsigned int x) { return (zext(x) > (BITS )) == 0; } + +/* + * check-name: cmp-zext-uimm1 + * check-command: test-linearize -Wno-decl $file + * check-known-to-fail + * + * check-output-ignore + * check-output-returns: 1 + */ |
