<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 --- - In i386 mode, some SSE intrinsics lead to &quot;error in backend: Do not know how to split the result of this operator!&quot;" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24335&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=zYZHXR4AncBL1jPdFLnCA6Wae5Gt2HHNI7gpSEn0G3U&s=4W1DBcH8XUUS3lY-KmnnB9ZJ82OcauG_BlQ29ZHs5H4&e=">24335</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>In i386 mode, some SSE intrinsics lead to "error in backend: Do not know how to split the result of this operator!"
          </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>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While doing a test build of the FreeBSD ports tree with clang trunk r241361, we
noticed the following failures:

<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__package18.nyi.freebsd.org_data_headi386PR201377-2Ddefault_2015-2D07-2D31-5F12h04m22s_logs_errors_lame-2D3.99.5-5F2.log&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=zYZHXR4AncBL1jPdFLnCA6Wae5Gt2HHNI7gpSEn0G3U&s=sX31twC73ikd-8y4kS5Mhkm44JzCeDF1cDWDN97nm_0&e=">http://package18.nyi.freebsd.org/data/headi386PR201377-default/2015-07-31_12h04m22s/logs/errors/lame-3.99.5_2.log</a>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__package18.nyi.freebsd.org_data_headi386PR201377-2Ddefault_2015-2D07-2D31-5F12h04m22s_logs_errors_speexdsp-2D1.2.r3-5F1.log&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=zYZHXR4AncBL1jPdFLnCA6Wae5Gt2HHNI7gpSEn0G3U&s=F4FZKgTuS9O-qMfYQ2vu8AHG83IXG2W10EbaiDqwD_s&e=">http://package18.nyi.freebsd.org/data/headi386PR201377-default/2015-07-31_12h04m22s/logs/errors/speexdsp-1.2.r3_1.log</a>

Both of these are caused by the same thing, namely using SSE builtins while the
target architecture is i386, and the target CPU is i486 (which is still the
default on FreeBSD).

For instance, in case of lame, it uses __builtin_ia32_sqrtps(), and a reduced
testcase is:

typedef int x0 __attribute__((__vector_size__(16)));
x0 x1, x2;
x3() { x2 = __builtin_ia32_sqrtps(x1); }

In case of speexdsp, it uses __builtin_ia32_cvtps2pd(), and a reduced testcase
is:

__attribute__((__vector_size__(4 * sizeof(0)))) x0, x1;
x2() { x1 = __builtin_ia32_cvtps2pd(x0); }

For both testcases, you get the following backend crash report:

$ clang -cc1 -triple i386 -emit-obj -w testcase.c
SplitVectorResult #0: 0x2b9383a8: v4f32 = llvm.x86.sse.sqrt.ps 0x2b93830c,
0x2b938444 [ORD=5] [ID=0]

fatal error: error in backend: Do not know how to split the result of this
operator!

I think the frontend should already produce a warning or an error on calling
SSE intrinsics which are not supported by the backend.  It seems a bit lame to
crash this "late" in the compilation process...</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>