[llvm-bugs] [Bug 31241] New: [AVX2] possible intrinsics code generation regression

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 2 13:04:55 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31241

            Bug ID: 31241
           Summary: [AVX2] possible intrinsics code generation regression
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

(I'm filing this on behalf of jzern at google.com -- llvm-admin at lists.llvm.org
seems to not respond to bugzilla account creation requests at the moment.)

Last tested with llvm 2fbac67, clang d0cab34.

The origin of this comes from a bug report in webrtc [1] related to
libvpx. This project uses chrome's clang toolchain with revisions from
[2], with the behavior change occuring between the r284979 and r287226
builds.
I bisected with the mono repo [3], but I've confirmed the behavior
with the split ones as well.

I don't have a minimal repro and haven't been through this particular
code in much depth, so it's possible there's an issue with that, but this has
been enabled and working within chrome and elsewhere using clang and gcc for
some time.

The original bug had issues with 64-bit TSan/UBsan linux builds as well as
32-bit non-santized builds. I only looked at the 32-bit target during
this.

objdumps of the offending function (vpx_filter_block1d16_v8_avx2) and
the full file are attached.

To reproduce with libvpx:

$ git clone https://chromium-review.googlesource.com/webm/libvpx
$ mkdir libvpx-build
$ cd libvpx-build
$ CLANG=/tmp/clang/bin; CC=$CLANG//clang CXX=$CLANG/clang++ \
  ../libvpx/configure --target=x86-linux-gcc \
  --disable-vp8 --disable-libyuv --disable-examples --disable-docs
--enable-debug
$ make -j
# requires curl
$ make testdata
$ ./test_libvpx --gtest_filter=VP9/TestVectorTest.*

The above will pass if the commit in [3] is reverted.

[1] https://bugs.chromium.org/p/webrtc/issues/detail?id=6781#c9
[2]
http://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Linux_x64/
[3]
https://github.com/llvm-project/llvm-project/
$ git bisect start fd4590c^ 8bf715e
$ git cherry-pick -n fd4590c
$ cmake ../llvm \
  -DLLVM_ENABLE_PROJECTS="clang" \
  -DCMAKE_INSTALL_PREFIX=/tmp/clang -DCMAKE_BUILD_TYPE=Release
commit a69e8b1dcab2f3ae764b1ceea9a4bcc02bf406a4
Author: Craig Topper <craig.topper at gmail.com>
Date:   Sun Oct 30 06:56:16 2016 +0000

    [X86] Use intrinsics table for PMADDUBSW and PMADDWD so that we
can use the legacy intrinsics to select EVEX encoded instructions when
available.

    This removes a couple tablegen classes that become unused after
this change. Another class gained an additional parameter to allow
PMADDUBSW to specify a different result type from its input type.

---
commit 648888d1c23187d01000ea4ae5811e6a0d880fcd
Author: Craig Topper <craig.topper at gmail.com>
Date:   Sun Oct 30 06:56:16 2016 +0000

    [X86] Use intrinsics table for PMADDUBSW and PMADDWD so that we
can use the legacy intrinsics to select EVEX encoded instructions when
available.

    This removes a couple tablegen classes that become unused after
this change. Another class gained an additional parameter to allow
PMADDUBSW to specify a different result type from its input type.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285515
91177308-0d34-0410-b5e6-96231b3b80d8

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161202/337edc8f/attachment.html>


More information about the llvm-bugs mailing list