24 lines · plain
1; RUN: opt -passes=sink -S < %s | FileCheck %s2 3; Verify that IR sinking does not move convergent operations to4; blocks that are not control equivalent.5 6; CHECK: define i32 @foo7; CHECK: entry8; CHECK-NEXT: call i32 @bar9; CHECK-NEXT: br i1 %arg10 11define i32 @foo(i1 %arg) {12entry:13 %c = call i32 @bar() nounwind readonly convergent14 br i1 %arg, label %then, label %end15 16then:17 ret i32 %c18 19end:20 ret i32 021}22 23declare i32 @bar() nounwind readonly convergent24