mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
9d0b7e9b17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267199 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
437 B
LLVM
24 lines
437 B
LLVM
; RUN: opt -sink -S < %s | FileCheck %s
|
|
|
|
; Verify that IR sinking does not move convergent operations to
|
|
; blocks that are not control equivalent.
|
|
|
|
; CHECK: define i32 @foo
|
|
; CHECK: entry
|
|
; CHECK-NEXT: call i32 @bar
|
|
; CHECK-NEXT: br i1 %arg
|
|
|
|
define i32 @foo(i1 %arg) {
|
|
entry:
|
|
%c = call i32 @bar() readonly convergent
|
|
br i1 %arg, label %then, label %end
|
|
|
|
then:
|
|
ret i32 %c
|
|
|
|
end:
|
|
ret i32 0
|
|
}
|
|
|
|
declare i32 @bar() readonly convergent
|