diff --git a/test/Integer/.cvsignore b/test/Integer/.cvsignore new file mode 100644 index 00000000000..83260f862f2 --- /dev/null +++ b/test/Integer/.cvsignore @@ -0,0 +1 @@ +Output diff --git a/test/Integer/BitArith.ll b/test/Integer/BitArith.ll new file mode 100644 index 00000000000..cf5e7e6a01e --- /dev/null +++ b/test/Integer/BitArith.ll @@ -0,0 +1,26 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + +declare void "foo"(i31 %i, i63 %j, i10 %k) + +implementation + +; foo test basic arith operations +define void "foo"(i31 %i, i63 %j, i10 %k) +begin + %t1 = trunc i63 %j to i31 + %t2 = add i31 %t1, %i + %t20 = add i31 3, %t1 + %t3 = zext i31 %i to i63 + %t4 = sub i63 %t3, %j + %t40 = sub i63 %j, -100 + %t5 = mul i10 %k, 7 + %t6 = sdiv i63 %j, -2 + %t7 = udiv i63 %j, %t3 + %t8 = urem i10 %k, 10 + %t9 = srem i10 %k, -10 + ret void +end + diff --git a/test/Integer/BitBit.ll b/test/Integer/BitBit.ll new file mode 100644 index 00000000000..02969bc9312 --- /dev/null +++ b/test/Integer/BitBit.ll @@ -0,0 +1,26 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + + +declare void "foo"(i31 %i, i17 %j) + +implementation + +; foo test basic bitwise operations +define void "foo"(i31 %i, i33 %j) +begin + %t1 = trunc i33 %j to i31 + %t2 = and i31 %t1, %i + %t3 = sext i31 %i to i33 + %t4 = or i33 %t3, %j + %t5 = xor i31 %t2, 7 + %t6 = shl i31 %i, i8 2 + %t7 = trunc i31 %i to i8 + %t8 = shl i8 %t7, i8 3 + %t9 = lshr i33 %j, i8 31 + %t10 = ashr i33 %j, i8 %t7 + ret void +end + diff --git a/test/Integer/BitCast.ll b/test/Integer/BitCast.ll new file mode 100644 index 00000000000..b1849bbab10 --- /dev/null +++ b/test/Integer/BitCast.ll @@ -0,0 +1,28 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + +declare void "foo"(i31 %i, i1280 %j, i1 %k, float %f) + +implementation + +; foo test basic arith operations +define void "foo"(i31 %i, i1280 %j, i1 %k, float %f) +begin + %t1 = trunc i1280 %j to i31 + %t2 = trunc i31 %t1 to i1 + + %t3 = zext i31 %i to i1280 + %t4 = sext i31 %i to i1280 + + %t5 = fptoui float 3.14159 to i31 + %t6 = uitofp i31 %t5 to double + + %t7 = fptosi double -1234.5678 to i28 + %t8 = sitofp i8 -1 to double + %t9 = uitofp i8 255 to double + + ret void +end + diff --git a/test/Integer/BitIcmp.ll b/test/Integer/BitIcmp.ll new file mode 100644 index 00000000000..d4475bf76b2 --- /dev/null +++ b/test/Integer/BitIcmp.ll @@ -0,0 +1,46 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + + +implementation + +define i55 "simpleIcmp"(i55 %i0, i55 %j0) +begin + %t1 = icmp eq i55 %i0, %j0 + %t2 = icmp ne i55 %i0, %j0 + %t3 = icmp ult i55 %i0, %j0 + %t4 = icmp sgt i55 %i0, %j0 + %t5 = icmp ule i55 %i0, %j0 + %t6 = icmp sge i55 %i0, %j0 + + %t7 = icmp eq i55 %i0, 1098765432 + %t8 = icmp ne i55 %i0, -31415926 + + %t9 = icmp ult i55 10000, %j0 + %t10 = icmp sgt i55 -10000, %j0 + + ret i55 %i0 +end + +define i31 "phitest"(i12 %i) +begin + +HasArg: + %n1 = add i12 1, %i + br label %Continue + +Continue: + %n = phi i12 [%n1, %HasArg], [%next, %Continue] + %next = add i12 1, %n + br label %Continue +end + +define i18 "select"(i18 %i) +begin + %t = icmp sgt i18 %i, 100 + %k = select i1 %t, i18 %i, i18 999 + ret i18 %k +end + diff --git a/test/Integer/BitMem.ll b/test/Integer/BitMem.ll new file mode 100644 index 00000000000..4d55a925667 --- /dev/null +++ b/test/Integer/BitMem.ll @@ -0,0 +1,34 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + +declare void "foo"() + + +implementation + +; foo test basic arith operations +define void "foo"() +begin + %t1 = malloc i31, i32 4 + %t2 = malloc i31, i32 7, align 1024 + %t3 = malloc [4 x i15] + + + %idx = getelementptr [4 x i15]* %t3, i64 0, i64 2 + store i15 -123, i15* %idx + + free [4 x i15]* %t3 + free i31* %t2 + free i31* %t1 + + %t4 = alloca i12, i32 100 + free i12* %t4 + + %t5 = alloca i31 + store i31 -123, i31* %t5 + + free i31* %t5 + ret void +end diff --git a/test/Integer/BitMisc.ll b/test/Integer/BitMisc.ll new file mode 100644 index 00000000000..1aaf62444d0 --- /dev/null +++ b/test/Integer/BitMisc.ll @@ -0,0 +1,25 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + +%MyVar = external global i19 +%MyIntList = external global { i39 *, i19 } + external global i19 ; i19*:0 + +%AConst = constant i19 -123 + +%AString = constant [4 x i8] c"test" + +%ZeroInit = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer, + [40 x float] zeroinitializer } + +implementation + +define i19 "foo"(i19 %blah) +begin + store i19 5, i19 *%MyVar + %idx = getelementptr { i39 *, i19 } * %MyIntList, i64 0, i32 1 + store i19 12, i19* %idx + ret i19 %blah +end diff --git a/test/Integer/BitPacked.ll b/test/Integer/BitPacked.ll new file mode 100644 index 00000000000..267c3fdb41d --- /dev/null +++ b/test/Integer/BitPacked.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + + +%foo1 = external global <4 x float>; +%foo2 = external global <2 x i10>; + +implementation ; Functions: + +define void %main() +{ + store <4 x float> , <4 x float>* %foo1 + store <2 x i10> , <2 x i10>* %foo2 + %l1 = load <4 x float>* %foo1 + %l2 = load <2 x i10>* %foo2 + %r1 = extractelement <2 x i10> %l2, i32 1 + %r2 = extractelement <2 x i10> %l2, i32 0 + %t = mul i10 %r1, %r2 + %r3 = insertelement <2 x i10> %l2, i10 %t, i32 0 + store <2 x i10> %r3, <2 x i10>* %foo2 + ret void +} diff --git a/test/Integer/a15.ll b/test/Integer/a15.ll new file mode 100644 index 00000000000..6c8e9d1dc3e --- /dev/null +++ b/test/Integer/a15.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 15 bits +; +%b = constant i15 add(i15 32767, i15 1) +%c = constant i15 add(i15 32767, i15 32767) +%d = constant i15 add(i15 32760, i15 8) +%e = constant i15 sub(i15 0 , i15 1) +%f = constant i15 sub(i15 0 , i15 32767) +%g = constant i15 sub(i15 2 , i15 32767) + +%h = constant i15 shl(i15 1 , i8 15) +%i = constant i15 shl(i15 1 , i8 14) +%j = constant i15 lshr(i15 32767 , i8 14) +%k = constant i15 lshr(i15 32767 , i8 15) +%l = constant i15 ashr(i15 32767 , i8 14) +%m = constant i15 ashr(i15 32767 , i8 15) + +%n = constant i15 mul(i15 32767, i15 2) +%o = constant i15 trunc( i16 32768 to i15 ) +%p = constant i15 trunc( i16 32767 to i15 ) + diff --git a/test/Integer/a15.ll.out b/test/Integer/a15.ll.out new file mode 100644 index 00000000000..ee0f12c3ac3 --- /dev/null +++ b/test/Integer/a15.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i15 0 ; [#uses=0] +%c = constant i15 -2 ; [#uses=0] +%d = constant i15 0 ; [#uses=0] +%e = constant i15 -1 ; [#uses=0] +%f = constant i15 1 ; [#uses=0] +%g = constant i15 3 ; [#uses=0] +%h = constant i15 0 ; [#uses=0] +%i = constant i15 -16384 ; [#uses=0] +%j = constant i15 1 ; [#uses=0] +%k = constant i15 0 ; [#uses=0] +%l = constant i15 -1 ; [#uses=0] +%m = constant i15 -1 ; [#uses=0] +%n = constant i15 -2 ; [#uses=0] +%o = constant i15 0 ; [#uses=0] +%p = constant i15 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a17.ll b/test/Integer/a17.ll new file mode 100644 index 00000000000..207f85e1c99 --- /dev/null +++ b/test/Integer/a17.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 17 bits +; +%b = constant i17 add(i17 131071, i17 1) +%c = constant i17 add(i17 131071, i17 131071) +%d = constant i17 add(i17 131064, i17 8) +%e = constant i17 sub(i17 0 , i17 1) +%f = constant i17 sub(i17 0 , i17 131071) +%g = constant i17 sub(i17 2 , i17 131071) + +%h = constant i17 shl(i17 1 , i8 17) +%i = constant i17 shl(i17 1 , i8 16) +%j = constant i17 lshr(i17 131071 , i8 16) +%k = constant i17 lshr(i17 131071 , i8 17) +%l = constant i17 ashr(i17 131071 , i8 16) +%m = constant i17 ashr(i17 131071 , i8 17) + +%n = constant i17 mul(i17 131071, i17 2) +%o = constant i17 trunc( i18 131072 to i17 ) +%p = constant i17 trunc( i18 131071 to i17 ) diff --git a/test/Integer/a17.ll.out b/test/Integer/a17.ll.out new file mode 100644 index 00000000000..bb6093858c5 --- /dev/null +++ b/test/Integer/a17.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i17 0 ; [#uses=0] +%c = constant i17 -2 ; [#uses=0] +%d = constant i17 0 ; [#uses=0] +%e = constant i17 -1 ; [#uses=0] +%f = constant i17 1 ; [#uses=0] +%g = constant i17 3 ; [#uses=0] +%h = constant i17 0 ; [#uses=0] +%i = constant i17 -65536 ; [#uses=0] +%j = constant i17 1 ; [#uses=0] +%k = constant i17 0 ; [#uses=0] +%l = constant i17 -1 ; [#uses=0] +%m = constant i17 -1 ; [#uses=0] +%n = constant i17 -2 ; [#uses=0] +%o = constant i17 0 ; [#uses=0] +%p = constant i17 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a31.ll b/test/Integer/a31.ll new file mode 100644 index 00000000000..6db33f6aa76 --- /dev/null +++ b/test/Integer/a31.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 31 bits +; +%b = constant i31 add(i31 2147483647, i31 1) +%c = constant i31 add(i31 2147483647, i31 2147483647) +%d = constant i31 add(i31 2147483640, i31 8) +%e = constant i31 sub(i31 0 , i31 1) +%f = constant i31 sub(i31 0 , i31 2147483647) +%g = constant i31 sub(i31 2 , i31 2147483647) + +%h = constant i31 shl(i31 1 , i8 31) +%i = constant i31 shl(i31 1 , i8 30) +%j = constant i31 lshr(i31 2147483647 , i8 30) +%k = constant i31 lshr(i31 2147483647 , i8 31) +%l = constant i31 ashr(i31 2147483647 , i8 30) +%m = constant i31 ashr(i31 2147483647 , i8 31) + +%n = constant i31 mul(i31 2147483647, i31 2) +%o = constant i31 trunc( i32 2147483648 to i31 ) +%p = constant i31 trunc( i32 2147483647 to i31 ) diff --git a/test/Integer/a31.ll.out b/test/Integer/a31.ll.out new file mode 100644 index 00000000000..1dcdc08f7e6 --- /dev/null +++ b/test/Integer/a31.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i31 0 ; [#uses=0] +%c = constant i31 -2 ; [#uses=0] +%d = constant i31 0 ; [#uses=0] +%e = constant i31 -1 ; [#uses=0] +%f = constant i31 1 ; [#uses=0] +%g = constant i31 3 ; [#uses=0] +%h = constant i31 0 ; [#uses=0] +%i = constant i31 -1073741824 ; [#uses=0] +%j = constant i31 1 ; [#uses=0] +%k = constant i31 0 ; [#uses=0] +%l = constant i31 -1 ; [#uses=0] +%m = constant i31 -1 ; [#uses=0] +%n = constant i31 -2 ; [#uses=0] +%o = constant i31 0 ; [#uses=0] +%p = constant i31 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a33.ll b/test/Integer/a33.ll new file mode 100644 index 00000000000..90f31b3f075 --- /dev/null +++ b/test/Integer/a33.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 33 bits +; +%b = constant i33 add(i33 8589934591, i33 1) +%c = constant i33 add(i33 8589934591, i33 8589934591) +%d = constant i33 add(i33 8589934584, i33 8) +%e = constant i33 sub(i33 0 , i33 1) +%f = constant i33 sub(i33 0 , i33 8589934591) +%g = constant i33 sub(i33 2 , i33 8589934591) + +%h = constant i33 shl(i33 1 , i8 33) +%i = constant i33 shl(i33 1 , i8 32) +%j = constant i33 lshr(i33 8589934591 , i8 32) +%k = constant i33 lshr(i33 8589934591 , i8 33) +%l = constant i33 ashr(i33 8589934591 , i8 32) +%m = constant i33 ashr(i33 8589934591 , i8 33) + +%n = constant i33 mul(i33 8589934591, i33 2) +%o = constant i33 trunc( i34 8589934592 to i33 ) +%p = constant i33 trunc( i34 8589934591 to i33 ) + diff --git a/test/Integer/a33.ll.out b/test/Integer/a33.ll.out new file mode 100644 index 00000000000..3fc306c508b --- /dev/null +++ b/test/Integer/a33.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i33 0 ; [#uses=0] +%c = constant i33 -2 ; [#uses=0] +%d = constant i33 0 ; [#uses=0] +%e = constant i33 -1 ; [#uses=0] +%f = constant i33 1 ; [#uses=0] +%g = constant i33 3 ; [#uses=0] +%h = constant i33 0 ; [#uses=0] +%i = constant i33 -4294967296 ; [#uses=0] +%j = constant i33 1 ; [#uses=0] +%k = constant i33 0 ; [#uses=0] +%l = constant i33 -1 ; [#uses=0] +%m = constant i33 -1 ; [#uses=0] +%n = constant i33 -2 ; [#uses=0] +%o = constant i33 0 ; [#uses=0] +%p = constant i33 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a63.ll b/test/Integer/a63.ll new file mode 100644 index 00000000000..9f039ed35c5 --- /dev/null +++ b/test/Integer/a63.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 63 bits +; +%b = constant i63 add(i63 9223372036854775807, i63 1) +%c = constant i63 add(i63 9223372036854775807, i63 9223372036854775807) +%d = constant i63 add(i63 9223372036854775800, i63 8) +%e = constant i63 sub(i63 0 , i63 1) +%f = constant i63 sub(i63 0 , i63 9223372036854775807) +%g = constant i63 sub(i63 2 , i63 9223372036854775807) + +%h = constant i63 shl(i63 1 , i8 63) +%i = constant i63 shl(i63 1 , i8 62) +%j = constant i63 lshr(i63 9223372036854775807 , i8 62) +%k = constant i63 lshr(i63 9223372036854775807 , i8 63) +%l = constant i63 ashr(i63 9223372036854775807 , i8 62) +%m = constant i63 ashr(i63 9223372036854775807 , i8 63) + +%n = constant i63 mul(i63 9223372036854775807, i63 2) +%o = constant i63 trunc( i64 9223372036854775808 to i63 ) +%p = constant i63 trunc( i64 9223372036854775807 to i63 ) diff --git a/test/Integer/a63.ll.out b/test/Integer/a63.ll.out new file mode 100644 index 00000000000..d2d0ce8f46b --- /dev/null +++ b/test/Integer/a63.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i63 0 ; [#uses=0] +%c = constant i63 -2 ; [#uses=0] +%d = constant i63 0 ; [#uses=0] +%e = constant i63 -1 ; [#uses=0] +%f = constant i63 1 ; [#uses=0] +%g = constant i63 3 ; [#uses=0] +%h = constant i63 0 ; [#uses=0] +%i = constant i63 -4611686018427387904 ; [#uses=0] +%j = constant i63 1 ; [#uses=0] +%k = constant i63 0 ; [#uses=0] +%l = constant i63 -1 ; [#uses=0] +%m = constant i63 -1 ; [#uses=0] +%n = constant i63 -2 ; [#uses=0] +%o = constant i63 0 ; [#uses=0] +%p = constant i63 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a7.ll b/test/Integer/a7.ll new file mode 100644 index 00000000000..e055c61e2e3 --- /dev/null +++ b/test/Integer/a7.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 7 bits +; +%b = constant i7 add(i7 127, i7 1) +%c = constant i7 add(i7 127, i7 127) +%d = constant i7 add(i7 120, i7 8) +%e = constant i7 sub(i7 0 , i7 1) +%f = constant i7 sub(i7 0 , i7 127) +%g = constant i7 sub(i7 2 , i7 127) + +%h = constant i7 shl(i7 1 , i8 7) +%i = constant i7 shl(i7 1 , i8 6) +%j = constant i7 lshr(i7 127 , i8 6) +%k = constant i7 lshr(i7 127 , i8 7) +%l = constant i7 ashr(i7 127 , i8 6) +%m = constant i7 ashr(i7 127 , i8 7) + +%n = constant i7 mul(i7 127, i7 2) +%o = constant i7 trunc( i8 128 to i7 ) +%p = constant i7 trunc( i8 255 to i7 ) + diff --git a/test/Integer/a7.ll.out b/test/Integer/a7.ll.out new file mode 100644 index 00000000000..3f71ea7ead4 --- /dev/null +++ b/test/Integer/a7.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i7 0 ; [#uses=0] +%c = constant i7 -2 ; [#uses=0] +%d = constant i7 0 ; [#uses=0] +%e = constant i7 -1 ; [#uses=0] +%f = constant i7 1 ; [#uses=0] +%g = constant i7 3 ; [#uses=0] +%h = constant i7 0 ; [#uses=0] +%i = constant i7 -64 ; [#uses=0] +%j = constant i7 1 ; [#uses=0] +%k = constant i7 0 ; [#uses=0] +%l = constant i7 -1 ; [#uses=0] +%m = constant i7 -1 ; [#uses=0] +%n = constant i7 -2 ; [#uses=0] +%o = constant i7 0 ; [#uses=0] +%p = constant i7 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/a9.ll b/test/Integer/a9.ll new file mode 100644 index 00000000000..907ac2b7a04 --- /dev/null +++ b/test/Integer/a9.ll @@ -0,0 +1,23 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t.ll +; RUN: diff %t.ll %s.out + +; test 9 bits +; +%b = constant i9 add(i9 511, i9 1) +%c = constant i9 add(i9 511, i9 511) +%d = constant i9 add(i9 504, i9 8) +%e = constant i9 sub(i9 0 , i9 1) +%f = constant i9 sub(i9 0 , i9 511) +%g = constant i9 sub(i9 2 , i9 511) + +%h = constant i9 shl(i9 1 , i8 9) +%i = constant i9 shl(i9 1 , i8 8) +%j = constant i9 lshr(i9 511 , i8 8) +%k = constant i9 lshr(i9 511 , i8 9) +%l = constant i9 ashr(i9 511 , i8 8) +%m = constant i9 ashr(i9 511 , i8 9) + +%n = constant i9 mul(i9 511, i9 2) +%o = constant i9 trunc( i10 512 to i9 ) +%p = constant i9 trunc( i10 511 to i9 ) + diff --git a/test/Integer/a9.ll.out b/test/Integer/a9.ll.out new file mode 100644 index 00000000000..4968167bea1 --- /dev/null +++ b/test/Integer/a9.ll.out @@ -0,0 +1,18 @@ +; ModuleID = '' +%b = constant i9 0 ; [#uses=0] +%c = constant i9 -2 ; [#uses=0] +%d = constant i9 0 ; [#uses=0] +%e = constant i9 -1 ; [#uses=0] +%f = constant i9 1 ; [#uses=0] +%g = constant i9 3 ; [#uses=0] +%h = constant i9 0 ; [#uses=0] +%i = constant i9 -256 ; [#uses=0] +%j = constant i9 1 ; [#uses=0] +%k = constant i9 0 ; [#uses=0] +%l = constant i9 -1 ; [#uses=0] +%m = constant i9 -1 ; [#uses=0] +%n = constant i9 -2 ; [#uses=0] +%o = constant i9 0 ; [#uses=0] +%p = constant i9 -1 ; [#uses=0] + +implementation ; Functions: diff --git a/test/Integer/alignment_bt.ll b/test/Integer/alignment_bt.ll new file mode 100644 index 00000000000..d74d9291742 --- /dev/null +++ b/test/Integer/alignment_bt.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + +%X = global i19 4, align 16 + +define i19 *%test() align 32 { + %X = alloca i19, align 4 + %Y = alloca i51, i32 42, align 16 + %Z = alloca i32, align 0 + ret i19 *%X +} + +define i19 *%test2() { + %X = malloc i19, align 4 + %Y = malloc i51, i32 42, align 16 + %Z = malloc i32, align 0 + ret i19 *%X +} + + diff --git a/test/Integer/basictest_bt.ll b/test/Integer/basictest_bt.ll new file mode 100644 index 00000000000..8140197e045 --- /dev/null +++ b/test/Integer/basictest_bt.ll @@ -0,0 +1,34 @@ +; RUN: llvm-as %s -o - | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + +implementation + +; Test "stripped" format where nothing is symbolic... this is how the bytecode +; format looks anyways (except for negative vs positive offsets)... +; +define void "void"(i39, i39) ; Def %0, %1 +begin + add i39 0, 0 ; Def 2 + sub i39 0, 4 ; Def 3 + br label %1 + +;