New testcase to see if -indvars can promote pointer arithmetic to array accesses
[oota-llvm.git] / test / Transforms / FunctionResolve / 2003-10-21-GlobalResolveHack.ll
1 ; This tests a hack put into place specifically for the C++ libstdc++ library.
2 ; It uses an ugly hack which is cleaned up by the funcresolve pass.
3
4 ; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep %X | grep '{'
5
6 %X = external global { int }
7 %X = global [ 4 x sbyte ] zeroinitializer
8
9 implementation
10
11 int* %test() {
12   %P = getelementptr {int}* %X, long 0, ubyte 0
13   ret int* %P
14 }