Open aheejin opened 3 years ago
This is now giving a good error message -
LLVM ERROR: -exception-model=wasm only allowed with at least one of -wasm-enable-eh or -wasm-enable-sjj
Edit - After adding -wasm-enable-eh option it is still the same error message.
Sorry, the attached ll file was not correct. It was supposed to crash but it compiled without a problem. But you can reproduce the error if you compile the cpp file directly. I think I pasted an incorrect ll file; I'll fix that.
The error message you saw is for a different reason. A while ago we changed the necessary flags to turn on Wasm EH in llc
, so now it additionally requires -wasm-enable-eh
. If you use clang or emscripten that flag is supplied by them so you don't need to manually add it, but to test llc
separately you need it. I'll update the original post with the correct ll file and the correct command line to reproduce the bug. By the way this bug has not been fixed yet.
Reproduces: https://llvm.godbolt.org/z/rdPMeKr1Y
Extended Description
Currently irreducible CFGs are fixed by WebAssemblyFixIrreducibleControlFlow pass, but irreducible CFGs caused by unwind edges are not handled by that pass. For example,
test.cpp:
test.ll:
This CFG cannot be handled by the wasm backend.
crashes with this error message: