aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-01-22 23:56:05 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-01-26 22:49:11 +0100
commita5a61b2e345bac65ef1c256daeb7842539ab1262 (patch)
treea9b1c51e5d8f2a8e3cf2f33b3cf222ff1bd0d9b4 /validation
parent54b6c78979c2a131a55c5439937e5e6bd8584b06 (diff)
downloadsparse-dev-a5a61b2e345bac65ef1c256daeb7842539ab1262.tar.gz
cmps: canonicalize SEL(x {<,<=} y, a, b) --> SEL(x {>=,>} y, b, a)
Both compares and OP_SELECT are anti-symmetrical: swapping the arguments is equivalent to inversing the condition. As consequence, when combined, they're symmetrical: swapping the arguments of the compare (or equivalently reversing the direction of the compare) and swapping the operand of the OP_SELECT is a no-op, both forms are equivalent. So, canonicalize these to always use OP_GT or OP_GE. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/optim/canonical-cmps-sel.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/canonical-cmps-sel.c b/validation/optim/canonical-cmps-sel.c
index f0a0effc..bba5e5c8 100644
--- a/validation/optim/canonical-cmps-sel.c
+++ b/validation/optim/canonical-cmps-sel.c
@@ -19,7 +19,6 @@ _Bool sel_leu(unsigned int a, unsigned int b, int x, int y)
/*
* check-name: canonical-cmps-sel
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1