Apparently Java7 has some nasty bug regarding loop optimization: Google search.
From the reports and bug descriptions I find it hard to judge how significant this bu
The problem, still exist as of Dec 2, 2012 in both Oracle JDK java -version java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) and openjdk java version "1.7.0_09-icedtea" OpenJDK Runtime Environment (fedora-2.3.3.fc17.1-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
Strange that individually any of -XX:-UseLoopPredicate or -XX:LoopUnrollLimit=1 option prevent bug from happening, but when used together - JDK fails see e.g. https://bugzilla.redhat.com/show_bug.cgi?id=849279