<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57183>57183</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            x86 backend crashes on inline asm
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          VoxSciurorum
      </td>
    </tr>
</table>

<pre>
    llc crashes on the IR generated for the crc inline asm instruction below.  TwoAddressInstruction asserts every instruction is in SSA form which is not true here.  The combination of "+" output constraint and "c" input constraint may be wrong.  If so the front end should reject the code.

```c
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;

uint32_t aws_checksums_crc32c_hw(const uint8_t *input, uint32_t previousCrc32) {
    uint32_t crc = ~previousCrc32;
    __asm__("CRC32B (%[in]), %[crc]" : "+c"(crc) : [ crc ] "c"(crc), [ in ] "r"(input));
    return ~crc;
}
```

IR file:
[crc-asm.ll.txt](https://github.com/llvm/llvm-project/files/9354562/crc-asm.ll.txt)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVMlu4zAM_Rr7QtSw5SXOwYcsU6DXdjDXQJboWFPHCrQ0zd8PpSzNFJjDBIJk8ZGPj6KUXstzN00ChOF2RAt6BjcivLzCHmc03KGEQZtoFEaAmic1I3B7oE_rjBdOUUyPkz5lAD9PeiWlQWtfHlBuLRpnAT_QnP-KU5a28Pa2CkkOcBqVGINx1g7ICWFEg4E3pNeHXs08xukBEsYStqYZtHdH7wgPxFzNDvgsAy4CquZv4IGfSS-cjJ73RP0ygNWxvoEsDpBi7aj9JMHgbxTuUruWmCX5NslX17nJL0Nc9u58RIkD-Nmq_UynJkZuwFPCdueScv0PryAoOJXswesy38zAT3YnRhTv1h_oy4iSid14Slgbq7oloYpXsdiEbe6ccDT4obS3mxCWsCUki2sWoN_dLfQ2KbeE_vg7onzw3u2o77sdJaaD3bxuSraGuKmTeq3mpN5SgpD9YiHOaGLEvLr2S8SlDVDQEuz1-pK93t56dneIXITTHbnC5gJf61yG8ajQoPNmDlUEgvt5LrbfmvZ4znTXBzUhablao_InKjWbpsx9ulhEOzp3tMGJPdPYKzf6PqM7SZtp-rgtT0ejw6WhbSC1tC7LuqobUv38jZa0x4QpdkXT5E3LqqpKZVfKZbnkqVNuwu6zbaDn4j1cy4dH-vUOU2-m7r_FKWt9VFcvirZMx64plgspGiYbuewrZHVdDqIvmorLRVG0Mp04PXLb0elQC2Y8QaQI7ai3qepYzljeFg3Lq7wqszwvuSzaQcihXGBeJlWOB66mLOjItNmnpouSer-3BE7KOvsF0j9GeB8Y0xE_927UpvulP9-E8kYbf0hj_i7q_wO0TXrr">