blob: 9936afb1956054306c31efef4e77f67e58760dfa [file] [log] [blame]
Tanya Lattner8b074702007-11-28 04:57:00 +00001; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {9 no alias}
2; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {6 may alias}
Gabor Greifcc322ca2008-02-28 08:38:45 +00003; RUN: llvm-as %s -o - | opt -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {MayAlias:.*i32\\* %Ipointer, i32\\* %Jpointer}
Christopher Lamb6f9fad52007-08-02 01:18:14 +00004
5define void @foo(i32* noalias %p, i32* noalias %q, i32 %i, i32 %j) {
Tanya Lattner8b074702007-11-28 04:57:00 +00006 %Ipointer = getelementptr i32* %p, i32 %i
Christopher Lamb6f9fad52007-08-02 01:18:14 +00007 %qi = getelementptr i32* %q, i32 %i
Tanya Lattner8b074702007-11-28 04:57:00 +00008 %Jpointer = getelementptr i32* %p, i32 %j
Christopher Lamb6f9fad52007-08-02 01:18:14 +00009 %qj = getelementptr i32* %q, i32 %j
10 store i32 0, i32* %p
Tanya Lattner8b074702007-11-28 04:57:00 +000011 store i32 0, i32* %Ipointer
12 store i32 0, i32* %Jpointer
Christopher Lamb6f9fad52007-08-02 01:18:14 +000013 store i32 0, i32* %q
14 store i32 0, i32* %qi
15 store i32 0, i32* %qj
16 ret void
17}