add a testcase for readonly call CSE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122730 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-01-03 03:33:47 +00:00
parent a60a8b0eb7
commit 03d49e955e

View File

@ -75,3 +75,15 @@ F:
; CHECK: F:
; CHECK: ret i32 %Diff
}
declare i32 @func(i32 *%P) readonly
;; Simple call CSE'ing.
; CHECK: @test5
define i32 @test5(i32 *%P) {
%V1 = call i32 @func(i32* %P)
%V2 = call i32 @func(i32* %P)
%Diff = sub i32 %V1, %V2
ret i32 %Diff
; CHECK: ret i32 0
}