1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00

add a testcase for readonly call CSE

llvm-svn: 122730
This commit is contained in:
Chris Lattner 2011-01-03 03:33:47 +00:00
parent 3d56e5f6d5
commit 57b02a342e

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
}