• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -loop-unswitch -S < %s 2>&1 | FileCheck %s
2
3; This test checks if unswitched condition preserve make.implicit metadata.
4
5define i32 @test(i1 %cond) {
6; CHECK: br i1 %cond, label %..split_crit_edge, label %.loop_exit.split_crit_edge, !make.implicit !0
7  br label %loop_begin
8
9loop_begin:
10; CHECK: br i1 true, label %continue, label %loop_exit, !make.implicit !0
11  br i1 %cond, label %continue, label %loop_exit, !make.implicit !0
12
13continue:
14  call void @some_func()
15  br label %loop_begin
16
17loop_exit:
18  ret i32 0
19}
20
21declare void @some_func()
22
23!0 = !{}
24