Skip to content

ARM NEON vectorization miscompiles code in 5.0 #33268

@mstorsjo

Description

@mstorsjo
Bugzilla Link 33921
Resolution FIXED
Resolved on Aug 21, 2017 12:54
Version 5.0
OS All
Blocks #33196
CC @ahmedbougacha,@ayalz,@rovka,@zmodem,@jmolloy,@rengolin

Extended Description

Starting with SVN r306803, some C code that wasn't vectorized before now is vectorized. This seems to break e.g. some VP9 inverse transforms in libavcodec, in code like this:

https://git.libav.org/?p=libav.git;a=blob;f=libavcodec/vp9dsp.c;h=7f863943284b8970744c81b0b7d749e5c9cf8bdf;hb=2b1324bd167553f49736e4eaa94f96da9982925e#l947 with the idct8_1d and iadst8_1d functions. If this file is built with -fno-tree-vectorize, the issue disappears.

This regressed when upgrading from SVN r305659 to the 5.0 branch point: https://fate.libav.org/armv7-win32-clang-5.0

Bisecting this leads to SVN r306803. The same issue can also be reproduced when targeting linux, not only windows. It should be reproducable by building libav and running "make fate-checkasm-vp9dsp", which should pass unless this is miscompiled.

I will dig into it further, hopefully soon, to fill in with a better reproducable testcase of the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions