common subexpr elim and tests