mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-10 01:10:48 +00:00
f2f6ce65b7
input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
600 B
LLVM
38 lines
600 B
LLVM
; RUN: opt < %s -instcombine -S | \
|
|
; RUN: grep {ret i32 %.toremerge} | count 2
|
|
;; Simple sinking tests
|
|
|
|
; "if then else"
|
|
define i32 @test1(i1 %C) {
|
|
%A = alloca i32
|
|
br i1 %C, label %Cond, label %Cond2
|
|
|
|
Cond:
|
|
store i32 -987654321, i32* %A
|
|
br label %Cont
|
|
|
|
Cond2:
|
|
store i32 47, i32* %A
|
|
br label %Cont
|
|
|
|
Cont:
|
|
%V = load i32* %A
|
|
ret i32 %V
|
|
}
|
|
|
|
; "if then"
|
|
define i32 @test2(i1 %C) {
|
|
%A = alloca i32
|
|
store i32 47, i32* %A
|
|
br i1 %C, label %Cond, label %Cont
|
|
|
|
Cond:
|
|
store i32 -987654321, i32* %A
|
|
br label %Cont
|
|
|
|
Cont:
|
|
%V = load i32* %A
|
|
ret i32 %V
|
|
}
|
|
|