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 | |||||
Reid Spencer | 69ccadd | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 3 | ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub |
Chris Lattner | 4acad5c | 2003-09-20 03:08:21 +0000 | [diff] [blame] | 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 | } |