Bjorn Pettersson 211cf8a384 [test] Use -passes in more Transforms tests
Another step towards getting rid of dependencies to the legacy
pass manager.

Primary change here is to just do -passes=foo instead of -foo in
simple situations (when running a single transform pass). But also
updated a few test running multiple passes.

Also removed some "duplicated" RUN lines in a few tests that where
using both -foo and -passes=foo syntax. No need to do the same kind
of testing twice.
2022-10-21 17:02:02 +02:00

24 lines
462 B
LLVM

; RUN: opt -passes=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() nounwind readonly convergent
br i1 %arg, label %then, label %end
then:
ret i32 %c
end:
ret i32 0
}
declare i32 @bar() nounwind readonly convergent