Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -ipsccp | llvm-dis | not grep global |
2 | |||||
3 | %G = internal global int undef | ||||
4 | |||||
5 | implementation | ||||
6 | |||||
7 | void %foo() { | ||||
8 | %X = load int* %G | ||||
9 | store int %X, int* %G | ||||
10 | ret void | ||||
11 | } | ||||
12 | |||||
13 | int %bar() { | ||||
14 | %V = load int* %G | ||||
15 | %C = seteq int %V, 17 | ||||
16 | br bool %C, label %T, label %F | ||||
17 | T: | ||||
18 | store int 17, int* %G | ||||
19 | ret int %V | ||||
20 | F: | ||||
21 | store int 123, int* %G | ||||
22 | ret int 0 | ||||
23 | } |