aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/range-check1.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-18simplify AND(x >= 0, x < C) --> (unsigned)x < CLuc Van Oostenryck1-1/+0
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>
2021-04-18add testcases for AND(x > 0, x <= C) --> x u<= CLuc Van Oostenryck1-0/+17
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>