diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-16 18:08:22 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-16 18:08:22 +0000 |
commit | c0948366f6cbec12d2c87f9cb4a1cea1435cf02a (patch) | |
tree | 5b7576753297038f1b9434f916c513132b9f5f3e /test/Integer/a15.ll | |
parent | a80cc93f103a3033f90a47d5e316c32d5e5a8826 (diff) | |
download | llvm-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/a15.ll')
-rw-r--r-- | test/Integer/a15.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Integer/a15.ll b/test/Integer/a15.ll new file mode 100644 index 0000000000..6c8e9d1dc3 --- /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 ) + |