blob: b0897ee6c859657f07612c6d8c795a90bc5a1ff5 [file] [log] [blame]
Jakub Kuderski638c0852017-08-15 18:14:57 +00001; XFAIL: *
2
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
5; PostDominatorTree.
6; TODO: This should be either replaced with another IR or deleted completely.
7
Serge Pavlov0668cd22017-01-10 02:50:47 +00008; RUN: opt -S -o - -structurizecfg -verify-dom-info < %s | FileCheck %s
Matt Arsenault6ea0aad2013-11-22 19:24:39 +00009
10; CHECK-LABEL: @no_branch_to_entry_undef(
11; CHECK: entry:
12; CHECK-NEXT: br label %entry.orig
13define void @no_branch_to_entry_undef(i32 addrspace(1)* %out) {
14entry:
15 br i1 undef, label %for.end, label %for.body
16
17for.body: ; preds = %entry, %for.body
18 store i32 999, i32 addrspace(1)* %out, align 4
19 br label %for.body
20
21for.end: ; preds = %Flow
22 ret void
23}
24
25; CHECK-LABEL: @no_branch_to_entry_true(
26; CHECK: entry:
27; CHECK-NEXT: br label %entry.orig
28define void @no_branch_to_entry_true(i32 addrspace(1)* %out) {
29entry:
30 br i1 true, label %for.end, label %for.body
31
32for.body: ; preds = %entry, %for.body
33 store i32 999, i32 addrspace(1)* %out, align 4
34 br label %for.body
35
36for.end: ; preds = %Flow
37 ret void
38}