RFR: 8298935: fix cyclic dependency bug in create_pack logic in SuperWord::find_adjacent_refs
Jatin Bhateja
jbhateja at openjdk.org
Mon Mar 6 04:51:09 UTC 2023
On Mon, 13 Feb 2023 01:43:49 GMT, Fei Gao <fgao at openjdk.org> wrote:
>>> @fg1417 Do you have the possibility to test on arm32?
>>
>> Sure. I'll do the testing with a 32-bit docker container on a 64-bit host.
>
>> > @fg1417 Do you have the possibility to test on arm32?
>>
>> Sure. I'll do the testing with a 32-bit docker container on a 64-bit host.
>
> The testing for tier 1 - 3 and jcstress looks good. No new failures on arm32. Thanks.
> In a follow-up RFE, the people who care about `+AlignVector` (eg. @fg1417 ) can improve the alignment requirements and analysis **[1]**, so that the performance can be restored, or even improved compared to what master does now.
>
> What are your thoughts on this? @fg1417 @jatin-bhateja @vnkozlov @TobiHartmann ?
>
I did some additional testing and found that following case which does not carry any true dependency no longer vectorizes with default options (-AlignVector).
public class Test {
static int N = 512;
public static void main(String[] strArr) {
double[] data1 = new double[N];
short[] data2 = new short[N];
init(data1, data2);
for (int i = 0; i < 10_000; i++){
test(data1, data2);
}
}
static void test(double[] data1, short[] data2) {
for (int i = 16; i < N-16; i++) {
short v = data2[i + 2];
data2[i] = v;
data1[i] = (double)v;
}
}
static void init(double[] data1, short[] data2) {
for (int j = 0; j < N; j++) {
data1[j] = (double)j;
data2[j] = (short)j;
}
}
}
With -XX:-AlignVector and Vectorize,true pragma it does vectorize, since short stores were seen as mis-aligned w.r.t to alignment enforced by ShortD nodes which were identified as best memory reference to algin with on account of being most well connected nodes, In strict sense new behavior looks correct, even bypassing mis-aligned memory access during extend_packlist.
-------------
PR: https://git.openjdk.org/jdk/pull/12350
More information about the hotspot-compiler-dev
mailing list