Home | History | Annotate | Download | only in BasicAA
      1 ; RUN: opt < %s -basicaa -gvn -instcombine |\
      2 ; RUN:   llvm-dis | grep {ret i32 0}
      3 
      4 declare void @foo(i32*)
      5 
      6 declare void @bar()
      7 
      8 define i32 @test() {
      9         %A = alloca i32         ; <i32*> [#uses=3]
     10         call void @foo( i32* %A )
     11         %X = load i32* %A               ; <i32> [#uses=1]
     12         tail call void @bar( )
     13         %Y = load i32* %A               ; <i32> [#uses=1]
     14         %Z = sub i32 %X, %Y             ; <i32> [#uses=1]
     15         ret i32 %Z
     16 }
     17