summaryrefslogtreecommitdiff
path: root/test/Integer/a17.ll
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-16 18:08:22 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-16 18:08:22 +0000
commitc0948366f6cbec12d2c87f9cb4a1cea1435cf02a (patch)
tree5b7576753297038f1b9434f916c513132b9f5f3e /test/Integer/a17.ll
parenta80cc93f103a3033f90a47d5e316c32d5e5a8826 (diff)
downloadllvm-c0948366f6cbec12d2c87f9cb4a1cea1435cf02a.tar.gz
llvm-c0948366f6cbec12d2c87f9cb4a1cea1435cf02a.tar.bz2
llvm-c0948366f6cbec12d2c87f9cb4a1cea1435cf02a.tar.xz
New test cases for bit accurate integers developed by Guoling Han.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Integer/a17.ll')
-rw-r--r--test/Integer/a17.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Integer/a17.ll b/test/Integer/a17.ll
new file mode 100644
index 0000000000..207f85e1c9
--- /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 )