<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - Assertion failed in function processTiedPairs"
   href="https://bugs.llvm.org/show_bug.cgi?id=40296">40296</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed in function processTiedPairs
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>danilo@FreeBSD.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hello, I'm getting an assertion failure building this project [1] on FreeBSD 13
using clang 7.0.1:

$ cc -Daws_checksums_EXPORTS
-I/usr/ports/devel/aws-checksums/work/aws-checksums-0.1.2/include
-I/usr/ports/devel/aws-checksums/work/aws-checksums-0.1.2/tests -O2 -pipe 
-fstack-protector -fno-strict-aliasing -O2 -pipe  -fstack-protector
-fno-strict-aliasing -fPIC   -fPIC -std=gnu99 -MD -MT
CMakeFiles/aws-checksums.dir/source/intel/crc32c_sse42_asm.c.o -MF
CMakeFiles/aws-checksums.dir/source/intel/crc32c_sse42_asm.c.o.d -o
CMakeFiles/aws-checksums.dir/source/intel/crc32c_sse42_asm.c.o   -c
/usr/ports/devel/aws-checksums/work/aws-checksums-0.1.2/source/intel/crc32c_sse42_asm.c
-O3
Assertion failed: (i == DstIdx || !MI->getOperand(i).isReg() ||
MI->getOperand(i).getReg() != RegA), function processTiedPairs, file
/usr/src/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp, line 1544.
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see
invocation)
FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM
7.0.1)

This is the file:
<a href="https://github.com/awslabs/aws-checksums/blob/master/source/intel/crc32c_sse42_asm.c">https://github.com/awslabs/aws-checksums/blob/master/source/intel/crc32c_sse42_asm.c</a>

It seems LLVM is triggering this assert because the inline assembly is not in
SSA form. Inline assembly is not supposed to be emitted as it is?

For convenience, here is the assertion code:
<a href="https://github.com/llvm-project/llvm/blob/master/lib/CodeGen/TwoAddressInstructionPass.cpp?#L1545">https://github.com/llvm-project/llvm/blob/master/lib/CodeGen/TwoAddressInstructionPass.cpp?#L1545</a>

Thanks in advance.

Danilo.

[1] - <a href="https://github.com/awslabs/aws-checksums">https://github.com/awslabs/aws-checksums</a></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>