![]() Bug 1790 ("musttail call must precede a ret with an optional bitcast") is caused by the GC stack slot pass inserting a store instruction between a musttail call and a return instruction. This is not allowed in LLVM IR. One solution would be to remove the musttail. That would probably work, but 1) the go-llvm API doesn't support this and 2) this might have unforeseen consequences. What I've done in this commit is to move the store instruction to a position earlier in the basic block, just after the last access to the GC stack slot alloca. Thanks to @fgsch for a very small repro, which I've used as a regression test. |
||
---|---|---|
.. | ||
allocs.ll | ||
allocs.out.ll | ||
allocs2.go | ||
coroutines.ll | ||
coroutines.out.ll | ||
func-lowering.ll | ||
func-lowering.out.ll | ||
gc-globals.ll | ||
gc-globals.out.ll | ||
gc-stackslots.ll | ||
gc-stackslots.out.ll | ||
globals-function-sections.ll | ||
globals-function-sections.out.ll | ||
interface.ll | ||
interface.out.ll | ||
interrupt-avr.ll | ||
interrupt-avr.out.ll | ||
interrupt-cortexm.ll | ||
interrupt-cortexm.out.ll | ||
maps.ll | ||
maps.out.ll | ||
panic.ll | ||
panic.out.ll | ||
reflect-implements.ll | ||
reflect-implements.out.ll | ||
reflect.go | ||
stacksize.ll | ||
stacksize.out.ll | ||
stringequal.ll | ||
stringequal.out.ll | ||
stringtobytes.ll | ||
stringtobytes.out.ll | ||
wasm-abi.ll | ||
wasm-abi.out.ll |