When the basic block delta pass removes the first basic block in a function, that function becomes illegal if the second block has extra predecessors. The function below is an example of one that triggers this issue. While we could think of various clever ways to fix this issue, the patch here simply makes the entry block ineligible for removal.
define void @aeDeleteEventLoop(ptr %0) {
%2 = alloca ptr, i32 0, align 8 %3 = alloca ptr, i32 0, align 8 call void @zfree() br label %4
4: ; preds = %6, %1
%5 = icmp ne ptr %0, null br i1 %5, label %6, label %7
6: ; preds = %4
store ptr null, ptr null, align 8 br label %4
7: ; preds = %4
ret void
}
Capitalize a