22 lines · plain
1; RUN: opt < %s -S -passes=licm | FileCheck %s2 3; Check that we do not hoist convergent functions out of loop4; CHECK: define i32 @test5; CHECK: loop:6; CHECK: call i32 @f7 8define i32 @test(ptr nocapture noalias %x, ptr nocapture %y) {9entry:10 br label %loop11 12loop:13 %a = call i32 @f() nounwind readnone convergent14 %exitcond = icmp ne i32 %a, 015 br i1 %exitcond, label %end, label %loop16 17end:18 ret i32 %a19}20 21declare i32 @f() nounwind readnone convergent22