This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [TESTCASE] gcc miscompiles Altivec code
- From: Dale Johannesen <dalej at apple dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Daniel Egger <degger at fhm dot edu>, GCC Developer Mailinglist <gcc at gcc dot gnu dot org>
- Date: Mon, 25 Feb 2002 18:45:38 -0800
- Subject: Re: [TESTCASE] gcc miscompiles Altivec code
On Monday, February 25, 2002, at 04:16 PM, Aldy Hernandez wrote:
>
> On Tuesday, February 26, 2002, at 09:15 AM, Daniel Egger wrote:
>
>> Hija,
>>
>> I distilled a (not so) small example for code being miscompiled
>> by gcc from yesterday on linux-ppc.
>> This one will segfault on my maschine when compiled with -O0.
>
> this is really helpful. thanks.
>
> however...
>
> tried it on my darwin box... compiles fine with -O[012]. i tried
> it on apple's altivec compiler and the resulting vectors are all zero.
Works for me, on the installed 2.95 compiler and on the 3. under
development.
Which one are you talking about Aldy?
Note that the posted testcase prints out the value after only one transpose
...v1[7] = vec[7];
Transpose (v1, v2);
Transpose (v2, v1);
vec[0] = v2[0];... // v1 value lost
so the right answer is really
1 9 17 25 33 41 49 57
2 10 18 26 34 42 50 58
3 11 19 27 35 43 51 59
4 12 20 28 36 44 52 60
5 13 21 29 37 45 53 61
6 14 22 30 38 46 54 62
7 15 23 31 39 47 55 63
8 16 24 32 4 48 56 64