At the end of the repeat scope, codegen loops through the results variable to unreference its items. This accesses the length of the array, which is a cached LLVM value. But the value is from a basic block that is not a predecessor of the current block. To make the cache realize that it's invalid, wrap the contBlock scope exiting in a codegen "branch."
At the end of the repeat scope, codegen loops through the
results
variable to unreference its items. This accesses the length of the array, which is a cached LLVM value. But the value is from a basic block that is not a predecessor of the current block. To make the cache realize that it's invalid, wrap thecontBlock
scope exiting in a codegen "branch."Closes #1581.