This serie add a few more simplification of multiplicative operators (multiplication, division & modulo) with constants 1 or -1. Only simplifications that doesn't depend on undefined behavior are done. Luc Van Oostenryck (5): move OP_MUL simplification in a separate function simplify '(x / 1)' to 'x' simplify '(x * -1)' to '-x' simplify '(x / -1)' to '-x' (but only for signed division) simplify '(x % 1)' into '0' simplify.c | 40 +++++++++++++++++++++++++++++++++++++ validation/optim/muldiv-by-one.c | 19 ++++++++++++++++++ validation/optim/muldiv-by-zero.c | 13 ++++++++++++ validation/optim/muldiv-minus-one.c | 15 ++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 validation/optim/muldiv-by-one.c create mode 100644 validation/optim/muldiv-by-zero.c create mode 100644 validation/optim/muldiv-minus-one.c -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html