Home | History | Annotate | Download | only in SimplifyCFG
      1 ; RUN: opt < %s -simplifycfg -S | FileCheck %s
      2 
      3 define void @f() {
      4 entry:
      5   br label %for.cond
      6 
      7 for.cond:
      8   %phi = phi i1 [ false, %entry ], [ true, %for.body ]
      9   %select = select i1 %phi, i32 1, i32 2
     10   br label %for.body
     11 
     12 for.body:
     13   switch i32 %select, label %for.cond [
     14     i32 1, label %return
     15     i32 2, label %for.body
     16   ]
     17 
     18 return:
     19   ret void
     20 }
     21 
     22 ; CHECK-LABEL: define void @f(
     23 ; CHECK: br label %[[LABEL:.*]]
     24 ; CHECK: br label %[[LABEL]]
     25