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