[FFmpeg-devel] fate-rv20-1239 failure on power8, aliasing bug

Lauri Kasanen cand at gmx.com
Mon Nov 26 13:22:01 EET 2018


On Mon, 26 Nov 2018 00:45:26 +0100
Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2018-11-25 16:17 GMT+01:00, Lauri Kasanen <cand at gmx.com>:
> > Hi,
> >
> > The lone power8 fate failing test seems like an aliasing issue.
> > I've isolated it into the attached standalone test case. Compiling it
> > with
> > gcc -std=c11 -maltivec -mabi=altivec -mvsx -O3 -fno-tree-vectorize
> > -o test test.c
> >
> > reproduces on gcc 8.2.0, dropping the optimization level fixes it. This
> > was one of the "adding a printf made it work" things too.
> >
> > -Wstrict-aliasing=1 complains about the "register int *idataptr =
> > (int*)dataptr;" cast. If I put "typedef int __attribute__((may_alias))
> > int_alias;" at the top and change the cast and type to int_alias, the
> > results become correct.
> 
> Thank you for the analysis!
> 
> Patch attached, Carl Eugen

Tested, fixes the fate test for me.

- Lauri


More information about the ffmpeg-devel mailing list