Assertion failed: (getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"), function setIncomingValue, file /usr/src/contrib/llvm-project/llvm/include/llvm/IR/Instructions.h, line 2656. [...] 1. <eof> parser at end of file 2. Per-file LLVM IR generation 3. Utilities/Thread.h:401:16: Generating code for declaration 'named_thread<(lambda at rpcs3/Emu/System.cpp:965:47)>::operator=' #0 0x0000000003e42fce PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13 #1 0x0000000003e41155 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0000000003e450fe HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:77:5 #3 0x0000000003e45281 CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51 #4 0x000000080506cb10 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3 c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-129-gd24d5c8e308) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin
Created attachment 216074 [details] command line args (for clang 10) The preprocessed source file is larger than 1Mb even compressed (by xz -9e), so run the following to get it. $ fetch -qo- https://reviews.freebsd.org/paste/raw/404/ | b64decode -o /dev/stdout | xz -dc >System-095a42.cpp
I have been able to reproduce this with the most recent upstream llvm-project checkout, and am now reducing the test case for submission into their bugzilla.
Reduced and reported upstream: https://bugs.llvm.org/show_bug.cgi?id=46557
I can't reproduce on 11.4 and 12.1: upstreamed sample and the port build fine. Tested base Clang 8.0.1, base Clang 10.0.0 and ports Clang 10.0.1 rc2. Note, on -CURRENT even ports Clang 10.0.1 rc2 does NOT crash but it's built with -DNDEBUG due to bug 233506.
A commit references this bug: Author: jbeich Date: Sat Aug 8 00:48:51 UTC 2020 New revision: 544351 URL: https://svnweb.freebsd.org/changeset/ports/544351 Log: emulators/rpcs3: switch to clang from ports PR: 247665 Changes: head/emulators/rpcs3/Makefile
I wish it was possible to disable LLVM_ASSERTIONS at runtime, so it was easier to test other projects against -CURRENT on their CI e.g., https://cirrus-ci.com/task/5397938333548544
Appears fixed upstream.