SuperWordLoopUnrollAnalysis and loop unrolling
Andrew Haley
aph at redhat.com
Fri Apr 14 16:41:13 UTC 2017
On 14/04/17 10:21, Yang Zhang wrote:
> My test result is just opposite with your description. Could you
> provide your test case?
// @Benchmark
public int[] sameArrayClass(BenchmarkState state) {
for (int i = 0; i < INITSIZE; i++) {
state.b[0] = state.b[1];
state.b[1] = state.b[2];
state.b[2] = state.b[3];
state.b[3] = state.b[0];
state.b[0] = state.b[1];
state.b[1] = state.b[2];
state.b[2] = state.b[3];
state.b[3] = state.b[0];
state.b[0] = state.b[1];
state.b[1] = state.b[2];
state.b[2] = state.b[3];
state.b[3] = state.b[0];
state.b[0] = state.b[1];
state.b[1] = state.b[2];
state.b[2] = state.b[3];
state.b[3] = state.b[0];
}
return state.b;
}
This is not vectorizable, but SuperWordLoopUnrollAnalysis=true disables
the unrolling which would make it faster.
Andrew.
More information about the hotspot-dev
mailing list