This series contains a series of simplifications and canonicalizations, mainly ones involving sign or zero extension. Luc Van Oostenryck (16): cmp: adapt testcase for compares' canonicalization cmp: add testcases for the simplification of compares cmp: add signed/unsigned to opcode table cmp: move some code in a separate function: simplify_compare_constant() cmp: use a few helpers for the simplification of compares cmp: canonicalize unsigned (x {<,>=} C) --> (x {<=,>} C-1) cmp: simplify unsigned (x {<=,>} UMAX) into {1,0} cmp: canonicalize unsigned compare with UMAX or UMAX-1 cmp: canonicalize unsigned (x {<=,>} SMAX) cmp: simplify sext(x) cmp C --> x cmp C cmp: simplify zext(x) cmp C --> x cmp C cmp: simplify sext(x) cmps {SMAX,SMIN} cmp: canonicalize sext(x) cmpu C (with C >= SMAX) cmp: simplify zext(x) cmps C cmp: simplify zext(x) cmpu C cmp: simplify compares and sign/zero extend opcode.c | 3 +- opcode.def | 164 ++++++++++---------- opcode.h | 8 +- simplify.c | 240 +++++++++++++++++++++++++----- validation/optim/canonical-cmp.c | 125 ++-------------- validation/optim/canonical-cmpu.c | 15 ++ validation/optim/cmp-sext-sext.c | 17 +++ validation/optim/cmp-sext-simm.c | 29 ++++ validation/optim/cmp-sext-uimm.c | 25 ++++ validation/optim/cmp-sext.c | 23 +++ validation/optim/cmp-zext-simm.c | 23 +++ validation/optim/cmp-zext-uimm0.c | 21 +++ validation/optim/cmp-zext-uimm1.c | 15 ++ validation/optim/cmp-zext-uimm2.c | 29 ++++ validation/optim/cmp-zext-zext.c | 17 +++ validation/optim/cmp-zext.c | 17 +++ validation/optim/set-uimm1.c | 10 ++ validation/optim/set-uimm2.c | 12 ++ validation/optim/set-uimm3.c | 10 ++ validation/optim/zext-cmpu.c | 16 ++ 20 files changed, 582 insertions(+), 237 deletions(-) create mode 100644 validation/optim/canonical-cmpu.c create mode 100644 validation/optim/cmp-sext-sext.c create mode 100644 validation/optim/cmp-sext-simm.c create mode 100644 validation/optim/cmp-sext-uimm.c create mode 100644 validation/optim/cmp-sext.c create mode 100644 validation/optim/cmp-zext-simm.c create mode 100644 validation/optim/cmp-zext-uimm0.c create mode 100644 validation/optim/cmp-zext-uimm1.c create mode 100644 validation/optim/cmp-zext-uimm2.c create mode 100644 validation/optim/cmp-zext-zext.c create mode 100644 validation/optim/cmp-zext.c create mode 100644 validation/optim/set-uimm1.c create mode 100644 validation/optim/set-uimm2.c create mode 100644 validation/optim/set-uimm3.c create mode 100644 validation/optim/zext-cmpu.c -- 2.29.2