• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -o - -structurizecfg < %s | FileCheck %s
2
3; CHECK-LABEL: @no_branch_to_entry_undef(
4; CHECK: entry:
5; CHECK-NEXT: br label %entry.orig
6define void @no_branch_to_entry_undef(i32 addrspace(1)* %out) {
7entry:
8  br i1 undef, label %for.end, label %for.body
9
10for.body:                                         ; preds = %entry, %for.body
11  store i32 999, i32 addrspace(1)* %out, align 4
12  br label %for.body
13
14for.end:                                          ; preds = %Flow
15  ret void
16}
17
18; CHECK-LABEL: @no_branch_to_entry_true(
19; CHECK: entry:
20; CHECK-NEXT: br label %entry.orig
21define void @no_branch_to_entry_true(i32 addrspace(1)* %out) {
22entry:
23  br i1 true, label %for.end, label %for.body
24
25for.body:                                         ; preds = %entry, %for.body
26  store i32 999, i32 addrspace(1)* %out, align 4
27  br label %for.body
28
29for.end:                                          ; preds = %Flow
30  ret void
31}
32