[llvm-commits] [llvm] r84383 - /llvm/trunk/test/Analysis/BasicAA/modref.ll
Chris Lattner
sabre at nondot.org
Sat Oct 17 16:59:51 PDT 2009
Author: lattner
Date: Sat Oct 17 18:59:51 2009
New Revision: 84383
URL: http://llvm.org/viewvc/llvm-project?rev=84383&view=rev
Log:
replace a useless test with a useful one
Modified:
llvm/trunk/test/Analysis/BasicAA/modref.ll
Modified: llvm/trunk/test/Analysis/BasicAA/modref.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/modref.ll?rev=84383&r1=84382&r2=84383&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/BasicAA/modref.ll (original)
+++ llvm/trunk/test/Analysis/BasicAA/modref.ll Sat Oct 17 18:59:51 2009
@@ -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
+; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
-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
-}
+declare void @llvm.memset.i32(i8*, i8, i32, i32)
+
+declare void @external(i32*)
-define i32 @caller() {
- %X = call i32 @callee( ) ; <i32> [#uses=1]
- ret i32 %X
+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
}
+
More information about the llvm-commits
mailing list