<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - SLP vectorization emits unsupported vectorized bswap on ARM"
   href="http://llvm.org/bugs/show_bug.cgi?id=19472">19472</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SLP vectorization emits unsupported vectorized bswap on ARM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>srhines@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12399" name="attach_12399" title="Input source file that triggers vectorized bswap">attachment 12399</a> <a href="attachment.cgi?id=12399&action=edit" title="Input source file that triggers vectorized bswap">[details]</a></span>
Input source file that triggers vectorized bswap

The SLP vectorizer is producing a v4i32 variant of bswap that the ARM target
can't lower. The error message is as follows:

fatal error: error in backend: Cannot select: 0xf8347f60: v4i32 = bswap
0xf8343d78 [ORD=34] [ID=49] dbg:external/libpng/pngrutil.c:43
  0xf8343d78: v4i32 = bitcast 0xf8348f08 [ORD=33] [ID=48]
dbg:external/libpng/pngrutil.c:43
    0xf8348f08: v2f64,ch = load 0xf8347930, 0xf83860d0,
0xf8349778<LD16[%35](align=4)> [ORD=33] [ID=47]
dbg:external/libpng/pngrutil.c:43
      0xf83860d0: i32 = add 0xf8386280, 0xf8347ed0 [ORD=21] [ID=33]
dbg:external/libpng/pngrutil.c:1233
        0xf8386280: i32 = FrameIndex<1> [ID=1]
        0xf8347ed0: i32 = Constant<8> [ID=8]
      0xf8349778: i32 = undef [ID=2]
In function: png_handle_cHRM


I am running with the following command line and have attached the preprocessed
.i file that breaks:

clang -cc1 -triple thumbv7--linux-androideabi -S -disable-free
-disable-llvm-verifier -main-file-name pngrutil.c -mrelocation-model pic
-pic-level 2 -pie-level 2 -relaxed-aliasing -fmath-errno -masm-verbose
-no-integrated-as -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu cortex-a8 -target-feature +soft-float-abi -target-feature +neon
-target-abi aapcs-linux -mfloat-abi soft -target-linker-version 2.22 -v -g
-ffunction-sections -fdata-sections -coverage-file /tmp/pngrutil-d27ed9.s
-nostdsysteminc -resource-dir
/usr/local/google/home/srhines/android_trees/aosp/prebuilts/clang/linux-x86/host/3.5/bin/../lib/clang/3.4
-dependency-file
out/target/product/manta/obj/STATIC_LIBRARIES/libpng_intermediates/pngrutil.d
-MT
out/target/product/manta/obj/STATIC_LIBRARIES/libpng_intermediates/pngrutil.o
-sys-header-deps -isystem system/core/include -isystem
hardware/libhardware/include -isystem hardware/libhardware_legacy/include
-isystem hardware/ril/include -isystem libnativehelper/include -isystem
frameworks/native/include -isystem frameworks/native/opengl/include -isystem
frameworks/av/include -isystem frameworks/base/include -isystem
external/skia/include -isystem out/target/product/manta/obj/include -isystem
bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem
bionic/libstdc++/include -isystem bionic/libc/kernel/uapi -isystem
bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem
bionic/libm/include/arm -isystem
prebuilts/clang/linux-x86/host/3.5/lib/clang/3.5/include/ -isystem
out/target/product/manta/obj/include/clang -include
build/core/combo/include/arch/linux-arm/AndroidConfig.h -D _FORTIFY_SOURCE=2 -D
ANDROID -D NDEBUG -D NDEBUG -U DEBUG -D __compiler_offsetof=__builtin_offsetof
-I external/zlib -I external/libpng -I
out/target/product/manta/obj/STATIC_LIBRARIES/libpng_intermediates -I
out/target/product/manta/gen/STATIC_LIBRARIES/libpng_intermediates -I
libnativehelper/include/nativehelper -I
build/core/combo/include/arch/linux-arm/ -internal-isystem
/usr/local/google/home/srhines/android_trees/aosp/prebuilts/clang/linux-x86/host/3.5/bin/../lib/clang/3.4/include
-Os -Wno-multichar -Werror=format-security -W -Wall -Wno-unused -Winit-self
-Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address
-Werror=sequence-point -Wstrict-aliasing=2 -std=gnu89 -fno-dwarf-directory-asm
-fdebug-compilation-dir /usr/local/google/home/srhines/android_trees/aosp
-ferror-limit 19 -fmessage-length 0 -ftrapv -stack-protector 1 -mstackrealign
-fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -o /tmp/pngrutil-d27ed9.s -x c pngrutil.i</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>