This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, ARM] Misaligned access support for ARM Neon
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Plotnikov Dmitry <dplotnikov at ispras dot ru>
- Cc: julian at codesourcery dot com, gcc-patches at gcc dot gnu dot org, paul at codesourcery dot com, rearnsha at arm dot com, eres at il dot ibm dot com, IRAR at il dot ibm dot com
- Date: Thu, 3 Dec 2009 16:57:05 +0100
- Subject: Re: [PATCH, ARM] Misaligned access support for ARM Neon
- References: <4B17D493.6040103@ispras.ru>
On Thu, Dec 3, 2009 at 4:09 PM, Plotnikov Dmitry <dplotnikov@ispras.ru> wrote:
>> Other failures are due to things like vectorizing *more* loops than
>> expected in several tests, and (as written before) missing parts in the
>> NEON support. I don't think there's anything which indicates actual
>> breakage.
>
> There seems to be a problem though: building libevas with
> this patch causes miscompile.
>
> Sometimes SLP pass somehow brokes data dependencies and causes
> "dirty = list_zeroed" initialization to be removed by DCE pass on rtl
> in the sample code below:
>
> #include <stdlib.h>
> #include <assert.h>
> struct list {
> ?int *head;
> ?int *tail;
> };
>
> typedef struct list list_t;
> static const list_t list_zeroed = { NULL, NULL };
>
> int seg(list_t *arg){
> ?if (arg->tail) {
> ? return 1;
> ?}
> ?return 0;
> }
>
> int main(int argc, char* argv[]){
> ?list_t dirty = list_zeroed;
> ?assert(seg(&dirty)==0);
> ?return 0;
> }
>
> We used GCC 4.5 snapshot from November 12, 2009 with options:
> "-ftree-vectorize -mfpu=neon -mfloat-abi=softfp -O2 -fno-inline"
>
> With -fno-tree-slp-vectorize option it works well.
That sounds more like an alias bug of either the vectorizer or
the alias-export code. Can you re-check with a more recent
snapshot and file a bugreport?
Thanks,
Richard.