1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -licm -S < %s | FileCheck %s
4 define void @hoist(i1 %a) {
7 ; CHECK-NEXT: [[B:%.*]] = freeze i1 [[A:%.*]]
8 ; CHECK-NEXT: br label [[LOOP:%.*]]
10 ; CHECK-NEXT: call void @use(i1 [[B]])
11 ; CHECK-NEXT: br label [[LOOP]]
21 define i1 @sink(i1 %a) {
24 ; CHECK-NEXT: br label [[LOOP:%.*]]
26 ; CHECK-NEXT: [[C:%.*]] = call i1 @cond()
27 ; CHECK-NEXT: br i1 [[C]], label [[LOOP]], label [[EXIT:%.*]]
29 ; CHECK-NEXT: [[FR_LE:%.*]] = freeze i1 [[A:%.*]]
30 ; CHECK-NEXT: ret i1 [[FR_LE]]
37 br i1 %c, label %loop, label %exit