blob: 49d2d152ae197f65b42224e2593e0d020d9c4324 [file] [log] [blame]
Tanya Lattner84f7fda2004-11-07 06:08:43 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
Chris Lattner57511502001-09-18 04:38:50 +00005%somestr = constant [11x sbyte] c"hello world"
Chris Lattnereb81d532001-12-14 16:46:53 +00006%array = constant [2 x int] [ int 12, int 52 ]
Chris Lattner57511502001-09-18 04:38:50 +00007 constant { int, int } { int 4, int 3 }
8
9implementation
10
Chris Lattnerbc42e522002-05-22 22:28:27 +000011[2 x int]* %testfunction(int %i0, int %j0)
Chris Lattner57511502001-09-18 04:38:50 +000012begin
Chris Lattnereb81d532001-12-14 16:46:53 +000013 ret [2x int]* %array
Chris Lattner57511502001-09-18 04:38:50 +000014end
15
Chris Lattnerbc42e522002-05-22 22:28:27 +000016sbyte* %otherfunc(int, double)
Chris Lattner57511502001-09-18 04:38:50 +000017begin
Chris Lattner8ec8b252002-10-06 22:43:49 +000018 %somestr = getelementptr [11x sbyte]* %somestr, long 0, long 0
Chris Lattnereb81d532001-12-14 16:46:53 +000019 ret sbyte* %somestr
Chris Lattner57511502001-09-18 04:38:50 +000020end
21
Chris Lattnerbc42e522002-05-22 22:28:27 +000022sbyte* %yetanotherfunc(int, double)
Chris Lattneredcc6132001-09-30 22:47:06 +000023begin
Chris Lattnereb81d532001-12-14 16:46:53 +000024 ret sbyte* null ; Test null
Chris Lattner57511502001-09-18 04:38:50 +000025end
Chris Lattneredcc6132001-09-30 22:47:06 +000026