JIT: some more integer optimizations

This isn't that heavily tested so it could probably use a JMC pass or two and a sanity check by some other eyes
you're right and I'm now sure how that ever worked