brintos

brintos / llvm-project-archived public Read only

0
0
Text · 529 B · 53e42a2 Raw
26 lines · plain
1; RUN: opt < %s -S -passes=loop-simplify | FileCheck %s2 3; Don't separate out nested loops if a convergent call is present4 5; CHECK-NOT: BB1.outer6; CHECK: BB1.backedge7 8define i32 @test(i1 %loop_cond, i1 %exit_cond, i32 %init) {9entry:10  br label %BB111 12BB1:13  %indvar = phi i32 [%indvar, %BB1], [%inc, %BB2], [%init, %entry]14  call void @f() convergent15  br i1 %loop_cond, label %BB1, label %BB216 17BB2:18  %inc = add i32 %indvar, 119  br i1 %exit_cond, label %exit, label %BB120 21exit:22  ret i32 %inc23}24 25declare void @f() convergent26