Home | History | Annotate | Download | only in BasicAA
      1 ; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
      2 ; rdar://7282591
      3 
      4 @X = common global i32 0
      5 @Y = common global i32 0
      6 @Z = common global i32 0
      7 
      8 ; CHECK:  NoAlias: i32* %P, i32* @Z
      9 
     10 define void @foo(i32 %cond) nounwind {
     11 entry:
     12   %"alloca point" = bitcast i32 0 to i32
     13   %tmp = icmp ne i32 %cond, 0
     14   br i1 %tmp, label %bb, label %bb1
     15 
     16 bb:
     17   br label %bb2
     18 
     19 bb1:
     20   br label %bb2
     21 
     22 bb2:
     23   %P = phi i32* [ @X, %bb ], [ @Y, %bb1 ]
     24   %tmp1 = load i32* @Z, align 4
     25   store i32 123, i32* %P, align 4
     26   %tmp2 = load i32* @Z, align 4
     27   br label %return
     28 
     29 return:
     30   ret void
     31 }
     32