FileCheck-ize these tests. Harden some of them.
[oota-llvm.git] / test / Analysis / BasicAA / nocapture.ll
1 ; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s
2
3 declare i32* @test(i32* nocapture)
4
5 define i32 @test2() {
6 ; CHECK: ret i32 0
7        %P = alloca i32
8        %Q = call i32* @test(i32* %P)
9        %a = load i32* %P
10        store i32 4, i32* %Q   ;; cannot clobber P since it is nocapture.
11        %b = load i32* %P
12        %c = sub i32 %a, %b
13        ret i32 %c
14 }
15