mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-21 03:37:47 +00:00
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
059f5a5e05
commit
a9db34f13c
15
test/Analysis/GlobalsModRef/purecse.ll
Normal file
15
test/Analysis/GlobalsModRef/purecse.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; Test that pure functions are cse'd away
|
||||
|
||||
; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine -adce| llvm-dis | not grep call
|
||||
|
||||
int %pure(int %X) {
|
||||
%Y = add int %X, 1
|
||||
ret int %Y
|
||||
}
|
||||
|
||||
int %test(int %X) {
|
||||
%A = call int %pure(int %X)
|
||||
%B = call int %pure(int %X)
|
||||
%C = sub int %A, %B
|
||||
ret int %C
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user