blob: 2c093bc9902ffcb3d015eb4cc4ab8c7f857be6cb [file] [log] [blame]
Reid Spencerc0948362007-01-16 18:08:22 +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
Reid Spencere3ff5ad2007-01-26 08:25:06 +00005declare void @"foo"()
Reid Spencerc0948362007-01-16 18:08:22 +00006
Reid Spencerc0948362007-01-16 18:08:22 +00007
8; foo test basic arith operations
Reid Spencere3ff5ad2007-01-26 08:25:06 +00009define void @"foo"() {
Reid Spencerc0948362007-01-16 18:08:22 +000010 %t1 = malloc i31, i32 4
11 %t2 = malloc i31, i32 7, align 1024
12 %t3 = malloc [4 x i15]
13
Reid Spencerc0948362007-01-16 18:08:22 +000014 %idx = getelementptr [4 x i15]* %t3, i64 0, i64 2
15 store i15 -123, i15* %idx
16
17 free [4 x i15]* %t3
18 free i31* %t2
19 free i31* %t1
20
21 %t4 = alloca i12, i32 100
22 free i12* %t4
23
24 %t5 = alloca i31
25 store i31 -123, i31* %t5
26
27 free i31* %t5
28 ret void
Reid Spencere3ff5ad2007-01-26 08:25:06 +000029}