diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-03-12 01:06:54 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-03-12 01:09:54 +0100 |
| commit | c089cd2dc771e5bf175a390966e454df3334955d (patch) | |
| tree | 826abdf09752fd0c2bcbb7f9b2c2b26010e8656d /validation/optim/cmpu-or0.c | |
| parent | d549d4d55eecb394e3f69314287f91e85b19e3e3 (diff) | |
| parent | eb4cdd21b7d0cedbbeff7f70e24473706ccce5a6 (diff) | |
| download | sparse-dev-c089cd2dc771e5bf175a390966e454df3334955d.tar.gz | |
Merge branches 'fix-ssa' and 'cmp-and-or' into next
* fix SSA conversion of mismatched memops
* simplify CMP(AND(x,M), C) and CMP(OR(x,M), C)
Diffstat (limited to 'validation/optim/cmpu-or0.c')
| -rw-r--r-- | validation/optim/cmpu-or0.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/validation/optim/cmpu-or0.c b/validation/optim/cmpu-or0.c new file mode 100644 index 00000000..e97e9180 --- /dev/null +++ b/validation/optim/cmpu-or0.c @@ -0,0 +1,18 @@ +#define EQ(X) + (X == 0) +#define MASK 32U + + +int cmpu_ior_lt_lt(int a) { return ((a | MASK) < (MASK - 1)) EQ(0); } +int cmpu_ior_lt_eq(int a) { return ((a | MASK) < (MASK )) EQ(0); } +int cmpu_ior_le_lt(int a) { return ((a | MASK) <= (MASK - 1)) EQ(0); } +int cmpu_ior_ge_lt(int a) { return ((a | MASK) >= (MASK - 1)) EQ(1); } +int cmpu_ior_ge_eq(int a) { return ((a | MASK) >= (MASK )) EQ(1); } +int cmpu_ior_gt_lt(int a) { return ((a | MASK) > (MASK - 1)) EQ(1); } + +/* + * check-name: cmpu-or0 + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-returns: 1 + */ |
