Skip to content

llvmGen: Ensure that entry labels don't have predecessors

Ben Gamari requested to merge wip/T17589 into master

The LLVM IR forbids the entry label of a procedure from having any predecessors. In the case of a simple looping function the LLVM code generator broke this invariant, as noted in #17589 (closed). Fix this by moving the function prologue to its own basic block, as suggested by @kavon in #11649 (closed).

Fixes #11649 (closed) and #17589 (closed).

Merge request reports