<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 - PHI node entries do not match predecessors!"
   href="https://bugs.llvm.org/show_bug.cgi?id=51514">51514</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PHI node entries do not match predecessors!
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mc@8thwall.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Upon upgrading our toolchain to emscripten 2.0.27 and associated upstream
clang, I see the following crash when compiling one of our source files.

PHI node entries do not match predecessors!
  %.pn = phi { i8*, i32 } [ %pair187, %lpad12 ], [ %pair1,
%_ZNK2kj8Disposer7disposeINS_16PromiseFulfillerIvEEEEvPT_.exit.i.i.i48 ], [
%pair1, %lpad ]
label %_ZNK2kj8Disposer7disposeINS_16PromiseFulfillerIvEEEEvPT_.exit.i.i.i48
label %tail69
in function _ZN2kj13UnixEventPort10FdObserverD2Ev


Stack dump:
0.      Program arguments:
/private/var/tmp/_bazel_mc/c4f4f6f74f33415f35a1ab44963d1e4f/execroot/code8/external/emcctoolchain/upstream/bin/clang++
-target wasm32-unknown-emscripten -DEMSCRIPTEN -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions
-mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2
-D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=27 -D_LIBCPP_ABI_VERSION=2
-Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang
-iwithsysroot/include/SDL
--sysroot=/private/var/tmp/_bazel_mc/c4f4f6f74f33415f35a1ab44963d1e4f/execroot/code8/external/emcctoolchain/upstream/emscripten/cache/sysroot
-Xclang -iwithsysroot/include/compat -std=c++17 -fcxx-exceptions -DJAVASCRIPT
-fexceptions -fno-threadsafe-statics -Wall -Wthread-safety -Wself-assign
-fno-omit-frame-pointer -fcolor-diagnostics -MD -MF
bazel-out/js-opt/bin/external/capnproto/_objs/kj/async-unix.d
-frandom-seed=bazel-out/js-opt/bin/external/capnproto/_objs/kj/async-unix.o
-DKJ_USE_FUTEX=0 -iquote external/capnproto -iquote
bazel-out/js-opt/bin/external/capnproto -isystem external/capnproto/c++/src
-isystem bazel-out/js-opt/bin/external/capnproto/c++/src -no-canonical-prefixes
-isystem
external/emcctoolchain/upstream/emscripten/emscripten/cache/sysroot/include/compat
-isystem
external/emcctoolchain/upstream/emscripten/emscripten/cache/sysroot/include
-isystem
external/emcctoolchain/upstream/emscripten/emscripten/cache/sysroot/include/libcxx
-isystem
external/emcctoolchain/upstream/emscripten/emscripten/cache/sysroot/include/libc
-isystem
external/emcctoolchain/upstream/emscripten/emscripten/cache/sysroot/lib/libcxxabi/include
-Wno-builtin-macro-redefined -D__DATE__=\"redacted\"
-D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -O3 -DNDEBUG
-ffunction-sections -fdata-sections -Wno-sign-compare -Wno-strict-aliasing
-Wno-unused-const-variable -Wno-unused-function -Wno-user-defined-warnings
-D_WINSOCK_DEPRECATED_NO_WARNINGS -c
external/capnproto/c++/src/kj/async-unix.c++ -o
bazel-out/js-opt/bin/external/capnproto/_objs/kj/async-unix.o
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'external/capnproto/c++/src/kj/async-unix.c++'.
4.      Running pass 'Module Verifier' on function
'@_ZN2kj13UnixEventPort10FdObserverD2Ev'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.dylib      0x000000010a24511a
llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1  libLLVM.dylib      0x000000010a243e88 llvm::sys::RunSignalHandlers() + 248
2  libLLVM.dylib      0x000000010a244550 llvm::sys::CleanupOnSignal(unsigned
long) + 208
3  libLLVM.dylib      0x000000010a15fb0a (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 106
4  libLLVM.dylib      0x000000010a15fa63
llvm::CrashRecoveryContext::HandleExit(int) + 19
5  libLLVM.dylib      0x000000010a24092c llvm::sys::Process::Exit(int, bool) +
44
6  clang++            0x000000010a09a536 LLVMErrorHandler(void*,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, bool) + 86
7  libLLVM.dylib      0x000000010a171bed llvm::report_fatal_error(llvm::Twine
const&, bool) + 269
8  libLLVM.dylib      0x000000010a171ad9 llvm::report_fatal_error(char const*,
bool) + 41
9  libLLVM.dylib      0x000000010a46806f (anonymous
namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&) + 111
10 libLLVM.dylib      0x000000010a3ca987
llvm::FPPassManager::runOnFunction(llvm::Function&) + 919
11 libLLVM.dylib      0x000000010a3d32d1
llvm::FPPassManager::runOnModule(llvm::Module&) + 65
12 libLLVM.dylib      0x000000010a3cb540
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2416
13 libclang-cpp.dylib 0x000000010ebf9c7b (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 11883
14 libclang-cpp.dylib 0x000000010ebf46ef
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::StringRef, llvm::Module*,
clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 4895
15 libclang-cpp.dylib 0x000000010ef51cf6
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1158
16 libclang-cpp.dylib 0x000000010db7d054 clang::ParseAST(clang::Sema&, bool,
bool) + 564
17 libclang-cpp.dylib 0x000000010f55bc33 clang::FrontendAction::Execute() + 99
18 libclang-cpp.dylib 0x000000010f4d2d5f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 847
19 libclang-cpp.dylib 0x000000010f5e0fe1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1457
20 clang++            0x000000010a09a216 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2054
21 clang++            0x000000010a097bcb
ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 283
22 libclang-cpp.dylib 0x000000010f198037 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__1::basic_string<char, std::__1::char_traits<char>,</span >
std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
23 libLLVM.dylib      0x000000010a15fa1c
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 236
24 libclang-cpp.dylib 0x000000010f197aa1
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__1::basic_string<char, std::__1::char_traits<char>,</span >
std::__1::allocator<char> >*, bool*) const + 305
25 libclang-cpp.dylib 0x000000010f1626f4
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const + 756
26 libclang-cpp.dylib 0x000000010f162b1d
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&)
const + 125
27 libclang-cpp.dylib 0x000000010f17bf1b
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) +
395
28 clang++            0x000000010a09742a main + 10394
29 libdyld.dylib      0x00007fff20353621 start + 1
30 libdyld.dylib      0x000000000000004d start + 18446603339975805485
clang++: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 14.0.0 (<a href="https://github.com/llvm/llvm-project">https://github.com/llvm/llvm-project</a>
78e87970af888bbbd5652c31f3a8454e8e9dd5b8)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir:
/private/var/tmp/_bazel_mc/c4f4f6f74f33415f35a1ab44963d1e4f/execroot/code8/external/emcctoolchain/upstream/bin
clang++: note: diagnostic msg:
********************</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>