new testcase

llvm-svn: 15259
This commit is contained in:
Chris Lattner 2004-07-27 06:35:11 +00:00
parent e30d3c8292
commit 0373d994a0
1 changed files with 15 additions and 0 deletions

View 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
}