diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-17 23:59:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-17 23:59:51 +0000 |
commit | bb5dd54e60ded55b75c1bfbc873210bc46c4470d (patch) | |
tree | 0f999963fda5dedcf7870c271efcb5265cf8b617 /test/Analysis | |
parent | 918fdb719a332177af23aaa94bdb667979205412 (diff) | |
download | external_llvm-bb5dd54e60ded55b75c1bfbc873210bc46c4470d.zip external_llvm-bb5dd54e60ded55b75c1bfbc873210bc46c4470d.tar.gz external_llvm-bb5dd54e60ded55b75c1bfbc873210bc46c4470d.tar.bz2 |
replace a useless test with a useful one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/BasicAA/modref.ll | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/test/Analysis/BasicAA/modref.ll b/test/Analysis/BasicAA/modref.ll index 8f7c0a7..54d415e 100644 --- a/test/Analysis/BasicAA/modref.ll +++ b/test/Analysis/BasicAA/modref.ll @@ -1,15 +1,21 @@ -; A very rudimentary test on AliasAnalysis::getModRefInfo. -; RUN: opt < %s -print-all-alias-modref-info -aa-eval -disable-output |& \ -; RUN: not grep NoModRef - -define i32 @callee() { - %X = alloca { i32, i32 } ; <{ i32, i32 }*> [#uses=1] - %Y = getelementptr { i32, i32 }* %X, i64 0, i32 0 ; <i32*> [#uses=1] - %Z = load i32* %Y ; <i32> [#uses=1] - ret i32 %Z -} +; RUN: opt < %s -basicaa -gvn -S | FileCheck %s + +declare void @llvm.memset.i32(i8*, i8, i32, i32) -define i32 @caller() { - %X = call i32 @callee( ) ; <i32> [#uses=1] - ret i32 %X +declare void @external(i32*) + +define i32 @test0(i8* %P) { + %A = alloca i32 + call void @external(i32* %A) + + store i32 0, i32* %A + + call void @llvm.memset.i32(i8* %P, i8 0, i32 42, i32 1) + + %B = load i32* %A + ret i32 %B + +; CHECK: @test0 +; CHECK: ret i32 0 } + |