• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -simplifycfg -S | FileCheck %s
2
3define void @f() {
4entry:
5  br label %for.cond
6
7for.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
12for.body:
13  switch i32 %select, label %for.cond [
14    i32 1, label %return
15    i32 2, label %for.body
16  ]
17
18return:
19  ret void
20}
21
22; CHECK-LABEL: define void @f(
23; CHECK: br label %[[LABEL:.*]]
24; CHECK: br label %[[LABEL]]
25