Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/optim/cse-dual-compare.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 validation/optim/cse-dual-compare.c diff --git a/validation/optim/cse-dual-compare.c b/validation/optim/cse-dual-compare.c new file mode 100644 index 000000000..b43cf7899 --- /dev/null +++ b/validation/optim/cse-dual-compare.c @@ -0,0 +1,34 @@ +static int eqeq(int a, int b) { return (a == b) == (b == a); } +static int nene(int a, int b) { return (a != b) == (b != a); } + +static int ltgt(int a, int b) { return (a < b) == (b > a); } +static int lege(int a, int b) { return (a <= b) == (b >= a); } +static int gele(int a, int b) { return (a >= b) == (b <= a); } +static int gtlt(int a, int b) { return (a > b) == (b < a); } + +static int eneqne(int a, int b) { return (a == b) == !(b != a); } +static int enneeq(int a, int b) { return (a != b) == !(b == a); } + +static int enltle(int a, int b) { return (a < b) == !(b <= a); } +static int enlelt(int a, int b) { return (a <= b) == !(b < a); } +static int engegt(int a, int b) { return (a >= b) == !(b > a); } +static int engtge(int a, int b) { return (a > b) == !(b >= a); } + +static int neeqne(int a, int b) { return (a == b) != (b != a); } +static int neneeq(int a, int b) { return (a != b) != (b == a); } + +static int neltle(int a, int b) { return (a < b) != (b <= a); } +static int nelelt(int a, int b) { return (a <= b) != (b < a); } +static int negegt(int a, int b) { return (a >= b) != (b > a); } +static int negtge(int a, int b) { return (a > b) != (b >= a); } + +/* + * check-name: cse-dual-compare + * check-command: test-linearize $file + * check-output-ignore + * check-known-to-fail + * + * check-output-excludes: set[gl][et]\\. + * check-output-excludes: seteq\\. + * check-output-excludes: setne\\. + */ -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html