Chris Lattner | 4acad5c | 2003-09-20 03:08:21 +0000 | [diff] [blame] | 1 | ; In this test, a local alloca cannot alias an incoming argument. |
2 | |||||
3 | ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub | ||||
4 | |||||
5 | int %test(int* %P) { | ||||
6 | %X = alloca int | ||||
7 | %V1 = load int* %P | ||||
8 | store int 0, int* %X | ||||
9 | %V2 = load int* %P | ||||
10 | %Diff = sub int %V1, %V2 | ||||
11 | ret int %Diff | ||||
12 | } |