blob: 299fa593d97dd18de2b0b19e103f0ee46a4f14c1 [file] [log] [blame]
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00001; RUN: llvm-as < %s | \
Dan Gohmanfea1dd02009-08-25 15:38:29 +00002; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t
Reid Spencerd3b1f6d2007-04-15 22:20:47 +00003; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
Dan Gohman28beeea2007-08-15 13:36:28 +00004; RUN: grep piclabel %t | count 3
5; RUN: grep GOT %t | count 3
Dan Gohmane5ab8c62007-08-15 13:45:35 +00006; RUN: not grep GOTOFF %t
Anton Korobeynikov7f705592007-01-12 19:20:47 +00007
Reid Spencere3ff5ad2007-01-26 08:25:06 +00008@ptr = external global i32*
9@dst = external global i32
10@src = external global i32
Anton Korobeynikov7f705592007-01-12 19:20:47 +000011
Chris Lattner7556bfd2009-06-24 19:48:04 +000012define void @foo() nounwind {
Anton Korobeynikov7f705592007-01-12 19:20:47 +000013entry:
Reid Spencere3ff5ad2007-01-26 08:25:06 +000014 store i32* @dst, i32** @ptr
15 %tmp.s = load i32* @src
16 store i32 %tmp.s, i32* @dst
Anton Korobeynikov7f705592007-01-12 19:20:47 +000017 ret void
18}
19