blob: 4be793ec416afabcbff03261409dfdf9bbc9274b [file] [log] [blame]
Chandler Carruth5da53432012-07-02 18:37:59 +00001; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
Bill Wendlingcd6df162012-04-24 09:15:38 +00002
3; CHECK: Function: foo
4; CHECK: MayAlias: i32* %Ipointer, i32* %Jpointer
5; CHECK: 9 no alias responses
6; CHECK: 6 may alias responses
Christopher Lamb1a802012007-08-02 01:18:14 +00007
8define void @foo(i32* noalias %p, i32* noalias %q, i32 %i, i32 %j) {
Tanya Lattner8f342f82007-11-28 04:57:00 +00009 %Ipointer = getelementptr i32* %p, i32 %i
Christopher Lamb1a802012007-08-02 01:18:14 +000010 %qi = getelementptr i32* %q, i32 %i
Tanya Lattner8f342f82007-11-28 04:57:00 +000011 %Jpointer = getelementptr i32* %p, i32 %j
Christopher Lamb1a802012007-08-02 01:18:14 +000012 %qj = getelementptr i32* %q, i32 %j
13 store i32 0, i32* %p
Tanya Lattner8f342f82007-11-28 04:57:00 +000014 store i32 0, i32* %Ipointer
15 store i32 0, i32* %Jpointer
Christopher Lamb1a802012007-08-02 01:18:14 +000016 store i32 0, i32* %q
17 store i32 0, i32* %qi
18 store i32 0, i32* %qj
19 ret void
20}