<html>
    <head>
      <base href="https://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 --- - Compiling ffmpeg (target-cpu i686 +sse): Do not know how to custom type legalize this operation!"
   href="https://llvm.org/bugs/show_bug.cgi?id=30512">30512</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compiling ffmpeg (target-cpu i686 +sse): Do not know how to custom type legalize this operation!
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dimitry@andric.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Similar to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compiling libx264 (target-cpu i686 +sse): Do not know how to custom type legalize this operation!"
   href="show_bug.cgi?id=30298">bug 30298</a>, building ffmpeg from the FreeBSD ports collection with
clang 3.9.0 release, on a 32-bit host, enabling SSE, results in:

clang -I. -I./ -DLIBICONV_PLUG -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DZLIB_CONST -DHAVE_AV_CONFIG_H -O2 -pipe  -DLIBICONV_PLUG
-fstack-protector -fno-strict-aliasing  -msse -I/usr/local/include/vorbis
-I/usr/local/include -std=c99 -fomit-frame-pointer -pthread
-I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/local/include
-I/usr/local/include/freetype2 -I/usr/local/include/libpng16
-I/usr/local/include/libpng16 -I/usr/local/include/freetype2
-I/usr/local/include/libpng16 -I/usr/local/include/opencv -I/usr/local/include
-I/usr/local/include/schroedinger-1.0 -I/usr/local/include/orc-0.4
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith
-Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes
-Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses
-Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno
-fno-signed-zeros -mstack-alignment=16 -mstackrealign -Qunused-arguments
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type  -MMD -MF libavcodec/hevc_filter.d -MT
libavcodec/hevc_filter.o -c -o libavcodec/hevc_filter.o
libavcodec/hevc_filter.c
In file included from libavcodec/hevc_filter.c:28:
In file included from libavcodec/cabac_functions.h:46:
libavcodec/x86/cabac.h:176:5: warning: macro expansion producing 'defined' has
undefined behavior [-Wexpansion-to-defined]
#if HAVE_7REGS && !BROKEN_COMPILER
    ^
./libavutil/x86/asm.h:75:82: note: expanded from macro 'HAVE_7REGS'
#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE &&
!defined(__clang__)))
                                                                               
 ^
Do not know how to custom type legalize this operation!
UNREACHABLE executed at
/share/dim/src/freebsd/base/projects/clang390-import/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp:21834!

This also occurs with trunk r282311, but not with 3.8.0 release, so it is a
regression.

Minimized test case:

// clang -cc1 -triple i386 -S -target-cpu i686 -target-feature +sse -O2
-vectorize-slp testcase.c
int a[4];
int b, c;
void fn1() {
  a[0] = b == 0;
  a[1] = c == 0;
  a[2] = b == 1;
  a[3] = c == 1;
}</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>