3 ; This test used to generate a region that caused it to delete the entry block,
4 ; but it does not anymore after the changes to handling of infinite loops in the
6 ; TODO: This should be either replaced with another IR or deleted completely.
8 ; RUN: opt -S -o - -structurizecfg -verify-dom-info < %s | FileCheck %s
10 ; CHECK-LABEL: @no_branch_to_entry_undef(
12 ; CHECK-NEXT: br label %entry.orig
13 define void @no_branch_to_entry_undef(i32 addrspace(1)* %out) {
15 br i1 undef, label %for.end, label %for.body
17 for.body: ; preds = %entry, %for.body
18 store i32 999, i32 addrspace(1)* %out, align 4
21 for.end: ; preds = %Flow
25 ; CHECK-LABEL: @no_branch_to_entry_true(
27 ; CHECK-NEXT: br label %entry.orig
28 define void @no_branch_to_entry_true(i32 addrspace(1)* %out) {
30 br i1 true, label %for.end, label %for.body
32 for.body: ; preds = %entry, %for.body
33 store i32 999, i32 addrspace(1)* %out, align 4
36 for.end: ; preds = %Flow