f38c03acca344e940fbe444ea476f544005f2762
[oota-llvm.git] / test / Transforms / FunctionAttrs / 2009-01-02-LocalStores.ll
1 ; RUN: opt < %s -functionattrs -S | not grep "nocapture *%%q"
2 ; RUN: opt < %s -functionattrs -S | grep "nocapture *%%p"
3
4 define i32* @a(i32** %p) {
5         %tmp = load i32** %p
6         ret i32* %tmp
7 }
8
9 define i32* @b(i32 *%q) {
10         %mem = alloca i32*
11         store i32* %q, i32** %mem
12         %tmp = call i32* @a(i32** %mem)
13         ret i32* %tmp
14 }