mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c595e6ca0a
commit
f616ee2895
@ -1,20 +0,0 @@
|
||||
; RUN: opt < %s -gvn -S | grep load | count 2
|
||||
|
||||
define i32 @main(i32** %p) {
|
||||
block1:
|
||||
%z = load i32** %p
|
||||
br i1 true, label %block2, label %block3
|
||||
|
||||
block2:
|
||||
%a = load i32** %p
|
||||
br label %block4
|
||||
|
||||
block3:
|
||||
%b = load i32** %p
|
||||
br label %block4
|
||||
|
||||
block4:
|
||||
%c = load i32** %p
|
||||
%d = load i32* %c
|
||||
ret i32 %d
|
||||
}
|
@ -279,6 +279,31 @@ Cont:
|
||||
; CHECK: ret i8 %A
|
||||
}
|
||||
|
||||
define i32 @chained_load(i32** %p) {
|
||||
block1:
|
||||
%z = load i32** %p
|
||||
br i1 true, label %block2, label %block3
|
||||
|
||||
block2:
|
||||
%a = load i32** %p
|
||||
br label %block4
|
||||
|
||||
block3:
|
||||
%b = load i32** %p
|
||||
br label %block4
|
||||
|
||||
block4:
|
||||
%c = load i32** %p
|
||||
%d = load i32* %c
|
||||
ret i32 %d
|
||||
|
||||
; CHECK: @chained_load
|
||||
; CHECK: %z = load i32** %p
|
||||
; CHECK-NOT: load
|
||||
; CHECK: %d = load i32* %z
|
||||
; CHECK-NEXT: ret i32 %d
|
||||
}
|
||||
|
||||
|
||||
declare i1 @cond() readonly
|
||||
declare i1 @cond2() readonly
|
||||
|
Loading…
Reference in New Issue
Block a user