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