[lld] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)
Matt Harding via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 17:01:29 PDT 2023
majaha wrote:
The counterexample is this:
```llvm
declare void @ext_never_return() noreturn
define i32 @missing_ret_noreturn_unreach() {
call void @ext_never_return()
unreachable
}
```
Which, when compiled with `TargetOptions.NoTrapAfterNoreturn = true`, outputs:
```wasm
missing_ret_noreturn_unreach:
.functype missing_ret_noreturn_unreach () -> (i32)
# %bb.0:
call ext_never_return
end_function
```
which *should* be
```wasm
missing_ret_noreturn_unreach:
.functype missing_ret_noreturn_unreach () -> (i32)
# %bb.0:
call ext_never_return
unreachable
end_function
```
> Also what is the case in which it is safe to remove, as I asked in https://github.com/llvm/llvm-project/pull/65876#discussion_r1332296556?
I'm not sure I understand the question. When is what safe to remove, exactly?
https://github.com/llvm/llvm-project/pull/65876
More information about the llvm-commits
mailing list