mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
a60a8b0eb7
commit
03d49e955e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user