PHINode should have one entry for each predecessor of its parent basic block! %setjmpTableSize6961 = phi i32 [ %setjmpTableSize6965, %if.then3148.split ], [ %setjmpTableSize6962, %indirectgoto ], [ %setjmpTableSize6962, %indirectgoto ], [ %setjmpTableSize6995, %if.end105.split.split ] in function main_loop_step fatal error: error in backend: Broken function found, compilation aborted! clang-10: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 10.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 10dad95a75592717d2f7c0ebc181fb8a970a8df7) Target: wasm32-unknown-emscripten Thread model: posix InstalledDir: /opt/sdk/emsdk/upstream/bin clang-10: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-10: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-10: note: diagnostic msg: /tmp/main-c2bb8b.c clang-10: note: diagnostic msg: /tmp/main-c2bb8b.sh clang-10: note: diagnostic msg: ******************** shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting