Mercurial > hg > CbC > CbC_llvm
comparison llvm/test/Transforms/StructurizeCFG/no-branch-to-entry.ll @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 ; 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 | |
8 ; RUN: opt -S -o - -structurizecfg -verify-dom-info < %s | FileCheck %s | |
9 | |
10 ; CHECK-LABEL: @no_branch_to_entry_undef( | |
11 ; CHECK: entry: | |
12 ; CHECK-NEXT: br label %entry.orig | |
13 define void @no_branch_to_entry_undef(i32 addrspace(1)* %out) { | |
14 entry: | |
15 br i1 undef, label %for.end, label %for.body | |
16 | |
17 for.body: ; preds = %entry, %for.body | |
18 store i32 999, i32 addrspace(1)* %out, align 4 | |
19 br label %for.body | |
20 | |
21 for.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 | |
28 define void @no_branch_to_entry_true(i32 addrspace(1)* %out) { | |
29 entry: | |
30 br i1 true, label %for.end, label %for.body | |
31 | |
32 for.body: ; preds = %entry, %for.body | |
33 store i32 999, i32 addrspace(1)* %out, align 4 | |
34 br label %for.body | |
35 | |
36 for.end: ; preds = %Flow | |
37 ret void | |
38 } |