blob: 6b5b93dedf9e91d2356e0574c918d657f281f62a [file] [log] [blame]
Chen Li50efd922015-08-05 21:13:26 +00001; RUN: opt < %s -loop-unswitch -S < %s 2>&1 | FileCheck %s
Alina Sbirleaa4961432018-09-11 19:19:21 +00002; RUN: opt < %s -loop-unswitch -enable-mssa-loop-dependency=true -verify-memoryssa -S < %s 2>&1 | FileCheck %s
Chen Li50efd922015-08-05 21:13:26 +00003
4; This test checks if unswitched condition preserve make.implicit metadata.
5
6define i32 @test(i1 %cond) {
Sanjoy Das92ce1e72017-04-11 04:11:47 +00007; CHECK-LABEL: @test(
8; CHECK: br i1 %cond, label %..split_crit_edge, label %.loop_exit.split_crit_edge, !make.implicit !0
Chen Li50efd922015-08-05 21:13:26 +00009 br label %loop_begin
10
11loop_begin:
Chen Li50efd922015-08-05 21:13:26 +000012 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 = !{}