blob: 4fa63ddd6ab566813a1f732eb9473a0440d8614b [file] [log] [blame]
Reid Spencer91948d42007-04-14 20:13:02 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -globaldce | llvm-dis | \
2; RUN: not grep Array
Chris Lattner340ab5b2005-01-31 04:49:22 +00003
4; Pulling the cast out of the load allows us to eliminate the load, and then
5; the whole array.
6
7%unop = type {int }
8%op = type {float}
9
10%Array = internal constant [1 x %op* (%op*)*] [ %op* (%op*)* %foo ]
11
12implementation
13
14%op* %foo(%op* %X) {
15 ret %op* %X
16}
17
18%unop* %caller(%op* %O) {
19 %tmp = load %unop* (%op*)** cast ([1 x %op* (%op*)*]* %Array to %unop* (%op*)**)
20 %tmp.2 = call %unop* (%op*)* %tmp(%op* %O)
21 ret %unop* %tmp.2
22}
23