<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello, I'm getting an assertion failure building this project [1] on FreeBSD 13 using clang 7.0.1:</div><div><br></div>$ 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<br>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.<br>cc: error: unable to execute command: Abort trap (core dumped)<br>cc: error: clang frontend command failed due to signal (use -v to see invocation)<br>FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1)<br><br><div>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></div><div><br></div><div>It seems LLVM is triggering this assert because the inline assembly is not in SSA form. Inline assembly is not supposed to be emit as it is?</div><div><br></div><div>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><br></div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Danilo.<br></div><div><br></div><div>[1] - <a href="https://github.com/awslabs/aws-checksums">https://github.com/awslabs/aws-checksums</a></div></div></div></div></div></div></div>