Chen Li | 50efd92 | 2015-08-05 21:13:26 +0000 | [diff] [blame] | 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 | |
| 5 | define i32 @test(i1 %cond) { |
Sanjoy Das | 92ce1e7 | 2017-04-11 04:11:47 +0000 | [diff] [blame] | 6 | ; CHECK-LABEL: @test( |
| 7 | ; CHECK: br i1 %cond, label %..split_crit_edge, label %.loop_exit.split_crit_edge, !make.implicit !0 |
Chen Li | 50efd92 | 2015-08-05 21:13:26 +0000 | [diff] [blame] | 8 | br label %loop_begin |
| 9 | |
| 10 | loop_begin: |
Chen Li | 50efd92 | 2015-08-05 21:13:26 +0000 | [diff] [blame] | 11 | br i1 %cond, label %continue, label %loop_exit, !make.implicit !0 |
| 12 | |
| 13 | continue: |
| 14 | call void @some_func() |
| 15 | br label %loop_begin |
| 16 | |
| 17 | loop_exit: |
| 18 | ret i32 0 |
| 19 | } |
| 20 | |
| 21 | declare void @some_func() |
| 22 | |
| 23 | !0 = !{} |