aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-01-22 23:56:32 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-01-26 22:51:30 +0100
commit95827edfcb2daa42fa18ce555f2c30910fdc2493 (patch)
tree662ef5ac7953c7f2c493ba60991d4eb792584ef9 /validation/optim
parenta5a61b2e345bac65ef1c256daeb7842539ab1262 (diff)
downloadsparse-dev-95827edfcb2daa42fa18ce555f2c30910fdc2493.tar.gz
cmps: canonicalize SEL(x > 0, a, -a) --> SEL(x >= 0, a, -a)
When computing the absolute value using an expression like: (a > 0) ? a : -a it's irrelevant to use '>' or '>=', both will give the same result since 0 is its own negation. Canonicalize these equivalent expressions, such that OP_GE is always used. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
-rw-r--r--validation/optim/canonical-abs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/canonical-abs.c b/validation/optim/canonical-abs.c
index 0809a52d..1bd6d89a 100644
--- a/validation/optim/canonical-abs.c
+++ b/validation/optim/canonical-abs.c
@@ -5,7 +5,6 @@ _Bool abs2(int a) { return (a < 0 ? -a : a) == (a <= 0 ? -a : a); }
/*
* check-name: canonical-abs1
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1