1; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s 2; If GEP base doesn't alias Z, then GEP doesn't alias Z. 3; rdar://7282591 4 5@Y = common global i32 0 6@Z = common global i32 0 7 8; CHECK: Function: foo 9; CHECK: NoAlias: i32* %P, i32* @Z 10 11define void @foo(i32 %cond) nounwind { 12entry: 13 %a = alloca i32 14 %tmp = icmp ne i32 %cond, 0 15 br i1 %tmp, label %bb, label %bb1 16 17bb: 18 %b = getelementptr i32, i32* %a, i32 0 19 br label %bb2 20 21bb1: 22 br label %bb2 23 24bb2: 25 %P = phi i32* [ %b, %bb ], [ @Y, %bb1 ] 26 %tmp1 = load i32, i32* @Z, align 4 27 store i32 123, i32* %P, align 4 28 %tmp2 = load i32, i32* @Z, align 4 29 br label %return 30 31return: 32 ret void 33} 34