8145322: Code generated from unsafe loops can be slightly improved

Improve code generated from checkIndex and unsafe loops

Reviewed-by: kvn, thartmann
7 files changed