[llvm-bugs] [Bug 34006] New: __msa_fill_w() fails

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 31 12:23:45 PDT 2017


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

            Bug ID: 34006
           Summary: __msa_fill_w() fails
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: fbarchard at google.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18879
  --> https://bugs.llvm.org/attachment.cgi?id=18879&action=edit
source file fom libyuv row_msa.cc

#define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */
#define ST_UB(...) ST_B(v16u8, __VA_ARGS__)

void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int width) {
  int x;
  v16u8 dst0 = (v16u8)__msa_fill_w(v32);

  for (x = 0; x < width; x += 4) {
    ST_UB(dst0, dst_argb);
    dst_argb += 16;
  }
}

This is what gcc produces:

Disassembly of section .text.ARGBSetRow_MSA:

0000000000000000 <ARGBSetRow_MSA>:
   0:   7b02281e        fill.w  $w0,a1
   4:   0000102d        move    v0,zero

0000000000000008 <.L390>:
   8:   58460000        bgec    v0,a2,c <.L390+0x4>
   c:   78002024        st.b    $w0,0(a0)
  10:   24420004        addiu   v0,v0,4
  14:   10000000        b       18 <.L390+0x10>
  18:   64840010        daddiu  a0,a0,16

000000000000001c <.L394>:
  1c:   d81f0000        jrc     ra

./src/third_party/llvm-build/Release+Asserts/bin/clang --version
clang version 6.0.0 (trunk 308728)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/media/fbarchard/ssd/build/libyuv/src/third_party/llvm-build/Release+Asserts/bin

This is the first part of the error before core dump.  See attached

../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF
obj/libyuv_msa/row_msa.o.d -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1
-DNO_TCMALLOC -DDISABLE_NACL -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD
-DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"308728-3\"
-D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H
-DANDROID_NDK_VERSION_ROLL=r12b_1 -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__GNU_SOURCE=1
-D__compiler_offsetof=__builtin_offsetof -Dnan=__builtin_nan
-Dsnprintf=snprintf -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
-I../.. -Igen -I../../include -fno-strict-aliasing --param=ssp-buffer-size=4
-fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__=
-D__TIMESTAMP__= -funwind-tables -fPIC -pipe -fcolor-diagnostics
-ffunction-sections -fno-short-enums -fintegrated-as
--target=mips64el-linux-androideabi --target=mips64el-linux-android
-march=mips64el -mcpu=mips64r6 -mmsa -mfp64 -Wall -Werror -Wextra
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing
-Wno-covered-switch-default -Wno-unneeded-internal-declaration
-Wno-inconsistent-missing-override -Wno-undefined-var-template
-Wno-nonportable-include-path -Wno-address-of-packed-member
-Wno-unused-lambda-capture -Wno-user-defined-warnings -Oz -fno-ident
-fdata-sections -ffunction-sections -fomit-frame-pointer -g2
--sysroot=../../third_party/android_tools/ndk/platforms/android-21/arch-mips64
-fvisibility=hidden -Xclang -load -Xclang
../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
-Xclang -add-plugin -Xclang find-bad-constructs -Xclang
-plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang
-plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene
-Wstring-conversion -Wtautological-overlap-compare -std=gnu++11 -fno-rtti
-isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include
-isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include
-isystem../../third_party/android_tools/ndk/sources/android/support/include
-fno-exceptions -fvisibility-inlines-hidden -c ../../source/row_msa.cc -o
obj/libyuv_msa/row_msa.o
clang:
/b/build/slave/linux_upload_clang/build/src/third_party/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:614:
void getCopyToPartsVector(llvm::SelectionDAG &, const llvm::SDLoc &,
llvm::SDValue, llvm::SDValue *, unsigned int, llvm::MVT, const llvm::Value *,
bool): Assertion `NumRegs == NumParts && "Part count doesn't match vector
breakdown!"' failed.

-- 
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/20170731/bbb1ad66/attachment.html>


More information about the llvm-bugs mailing list