Home | History | Annotate | Download | only in StructurizeCFG
      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
      6 define void @no_branch_to_entry_undef(i32 addrspace(1)* %out) {
      7 entry:
      8   br i1 undef, label %for.end, label %for.body
      9 
     10 for.body:                                         ; preds = %entry, %for.body
     11   store i32 999, i32 addrspace(1)* %out, align 4
     12   br label %for.body
     13 
     14 for.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
     21 define void @no_branch_to_entry_true(i32 addrspace(1)* %out) {
     22 entry:
     23   br i1 true, label %for.end, label %for.body
     24 
     25 for.body:                                         ; preds = %entry, %for.body
     26   store i32 999, i32 addrspace(1)* %out, align 4
     27   br label %for.body
     28 
     29 for.end:                                          ; preds = %Flow
     30   ret void
     31 }
     32