aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-02-09 02:36:14 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-04-18 17:21:37 +0200
commitdf7767c6c57284ec3deda589f3694d2170b21fd6 (patch)
treead444f1cd7ec2aa07f2e6c8d7b7e5654018e5ec3 /validation
parent28cd6d609ea460c6138f8cd17f89fc9885fb7dc2 (diff)
downloadsparse-dev-df7767c6c57284ec3deda589f3694d2170b21fd6.tar.gz
simplify AND(x >= 0, x < C) --> (unsigned)x < C
Such compares with a signed value are relatively common and can be easily be simplified into a single unsigned compare. So, do it. Note: This simplification triggers only 27 times in a x86-64 defconfig kernel. I expected more but I suppose it's because most checks aren't done against a constant or are done with unsigned values. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/optim/range-check1.c1
-rw-r--r--validation/optim/range-check2.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/validation/optim/range-check1.c b/validation/optim/range-check1.c
index 82b93991..358da045 100644
--- a/validation/optim/range-check1.c
+++ b/validation/optim/range-check1.c
@@ -8,7 +8,6 @@ _Bool check_ok(long i)
/*
* check-name: range-check1
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-contains: setbe\\..*0x3ff
diff --git a/validation/optim/range-check2.c b/validation/optim/range-check2.c
index f565b84e..69c01b9d 100644
--- a/validation/optim/range-check2.c
+++ b/validation/optim/range-check2.c
@@ -8,7 +8,6 @@ _Bool check_ok(int i)
/*
* check-name: range-check2
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-returns: 1