summaryrefslogtreecommitdiffstats
path: root/test/Integer/a31.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Integer/a31.ll')
-rw-r--r--test/Integer/a31.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Integer/a31.ll b/test/Integer/a31.ll
new file mode 100644
index 0000000..6db33f6
--- /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 )