This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug target/27827] [4.0/4.1 Regression] gcc 4 produces worse x87 code on all platforms than gcc 3
- From: Dorit Nuzman <DORIT at il dot ibm dot com>
- To: gcc-bugzilla at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 9 Aug 2006 23:08:06 +0300
- Subject: Re: [Bug target/27827] [4.0/4.1 Regression] gcc 4 produces worse x87 code on all platforms than gcc 3
>
> Here's some questions I need to figure out:
> (1) Why do I have to throw the -funsafe-math-optimizations flag to
> enable this?
> -- I see where the .vect file warns of it, but it refers to an SSA
line,
> so I'm not sure what's going on.
This flag is needed in order to allow vectorization of reduction (summation
in your case) of floating-point data. This is because vectorization of
reduction changes the order of the computation, which may result in
different behavior (instead of summing this way:
((((((a0+a1)+a2)+a3)+a4)+a5)+a6)+a7, we sum this way
(((a0+a2)+a4)+a6)+(((a1+a3)+a5)+a7)
> (2) Is there any pragma or assertion, etc, that I can put in the code to
> notify the compiler that certain pointers point to 16-byte aligned
data?
> -- Only the output array (C) is possibly misaligned in ATLAS
>
Not really, I'm afraid - there is something that's not entirely supported
in gcc yet - see details in PR20794.
dorit
> Thanks,
> Clint
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27827
>