This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Auto-vectorization with gcj
- From: Andrew Haley <aph at redhat dot com>
- To: Dietmar Lippold <dietmar dot lippold at informatik dot uni-stuttgart dot de>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 15 May 2005 11:07:32 +0100
- Subject: Re: Auto-vectorization with gcj
- References: <200505150957.LAA16344@isis.informatik.uni-stuttgart.de>
Dietmar Lippold writes:
> I tried to test auto-vectorization with the following java program:
>
> public class Test {
> private static int[] a = new int[256];
> private static int[] b = new int[256];
> private static int[] c = new int[256];
>
> public static final void main(String[] args) {
> for (int i = 0; i < 256; i++) {
> b[i] = i;
> c[i] = i;
> }
> for (int i = 0; i < 256; i++) {
> a[i] = b[i] + c[i];
> }
> }
> }
>
> When I compile it with
>
> gcj -msse2 -O2 -ftree-vectorize -ftree-vectorizer-verbose=5 -c Test.java
>
> I get the following message:
>
> Test.java:9: note: not vectorized: multiple exits.
> Test.java:14: note: not vectorized: multiple exits.
> Test.java:7: note: vectorized 0 loops in function.
>
> Is it not possible to use auto-vectorization with gcj until now?
Not as far as I am aware, no. You may be the first person ever to
try it.
I don't know why the compiler believes the loops have multiple exits.
If you want to find out, it's time to start looking at dumps.
Andrew.