optimise sum([int_const for ...]) into an inlined sum(genexpr)