Bounds-check elimination
The compiler proves an array index always stays in range and removes the check the language would otherwise demand on every access.
Java, C#, Go and Rust check every indexing operation, which is why they don't suffer C's buffer overflows. The check is just a compare and a branch, but in an inner loop it also blocks vectorization. A loop from 0 to len(a) obviously needs no check, and that's exactly the kind of proof the compiler hunts for, using range analysis and induction variables.
HotSpot splits loops into pre, main and post loops, where only the main loop is guaranteed in bounds and runs check-free. Go will list the surviving checks with -gcflags=-d=ssa/check_bce. Rust programmers learn that a single assert! before the loop, or an iterator instead of an index, often makes every check inside it vanish.