1 ; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {NoAlias:.*%P,.*@Z} 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 define void @foo(i32 %cond) nounwind { 9 entry: 10 %a = alloca i32 11 %tmp = icmp ne i32 %cond, 0 12 br i1 %tmp, label %bb, label %bb1 13 14 bb: 15 %b = getelementptr i32* %a, i32 0 16 br label %bb2 17 18 bb1: 19 br label %bb2 20 21 bb2: 22 %P = phi i32* [ %b, %bb ], [ @Y, %bb1 ] 23 %tmp1 = load i32* @Z, align 4 24 store i32 123, i32* %P, align 4 25 %tmp2 = load i32* @Z, align 4 26 br label %return 27 28 return: 29 ret void 30 } 31