summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler
diff options
context:
space:
mode:
authorAndrey Bokhanko <andreybokhanko@gmail.com>2016-10-04 12:43:46 +0000
committerAndrey Bokhanko <andreybokhanko@gmail.com>2016-10-04 12:43:46 +0000
commit6903be56d58e7f39053b6db4be42c83d7906ccce (patch)
tree7de0240a0986f3418e6b5400bf3a8e47f8aff62b /llvm/test/Assembler
parentb90f3cf15ba286156fc43ec7882c162c24d6446c (diff)
downloadbcm5719-llvm-6903be56d58e7f39053b6db4be42c83d7906ccce.tar.gz
bcm5719-llvm-6903be56d58e7f39053b6db4be42c83d7906ccce.zip
Fix IntegerType::MAX_INT_BITS value
IntegerType::MAX_INT_BITS is apparently not in sync with Type::SubclassData size. This patch fixes this. Differential Revision: https://reviews.llvm.org/D24814 llvm-svn: 283215
Diffstat (limited to 'llvm/test/Assembler')
-rw-r--r--llvm/test/Assembler/invalid-inttype.ll5
-rw-r--r--llvm/test/Assembler/max-inttype.ll4
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Assembler/invalid-inttype.ll b/llvm/test/Assembler/invalid-inttype.ll
new file mode 100644
index 00000000000..145153d8f11
--- /dev/null
+++ b/llvm/test/Assembler/invalid-inttype.ll
@@ -0,0 +1,5 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+; i16777216 is the smallest integer type that can't be represented in LLVM IR
+@i2 = common global i16777216 0, align 4
+; CHECK: expected type
diff --git a/llvm/test/Assembler/max-inttype.ll b/llvm/test/Assembler/max-inttype.ll
new file mode 100644
index 00000000000..10eed60f3db
--- /dev/null
+++ b/llvm/test/Assembler/max-inttype.ll
@@ -0,0 +1,4 @@
+; RUN: llvm-as < %s | llvm-dis
+
+; i16777215 is the maximum integer type represented in LLVM IR
+@i2 = common global i16777215 0, align 4
OpenPOWER on IntegriCloud