summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2015-03-02 06:33:51 +0000
committerOwen Anderson <resistor@mac.com>2015-03-02 06:33:51 +0000
commit040f2f890e95d777e19cb11f090095c86c8d2034 (patch)
tree477652b18ebc254c660aa839c0aeae91714d3869 /llvm/test
parentd333c36e8a765bc08ec0fb44bafcfa10870818c1 (diff)
downloadbcm5719-llvm-040f2f890e95d777e19cb11f090095c86c8d2034.tar.gz
bcm5719-llvm-040f2f890e95d777e19cb11f090095c86c8d2034.zip
Teach DataLayout that pointer ABI and preferred alignments are required to be powers of two.
Previously this resulted in asserts and/or crashes (depending on build configuration) at various phases in the optimizer. llvm-svn: 230938
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/invalid-datalayout20.ll6
-rw-r--r--llvm/test/Assembler/invalid-datalayout21.ll6
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Assembler/invalid-datalayout20.ll b/llvm/test/Assembler/invalid-datalayout20.ll
new file mode 100644
index 00000000000..a9ac1d7fe09
--- /dev/null
+++ b/llvm/test/Assembler/invalid-datalayout20.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+target datalayout = "p:64:24:64"
+
+; CHECK: Pointer ABI alignment must be a power of 2
+
diff --git a/llvm/test/Assembler/invalid-datalayout21.ll b/llvm/test/Assembler/invalid-datalayout21.ll
new file mode 100644
index 00000000000..a39d1d7a14a
--- /dev/null
+++ b/llvm/test/Assembler/invalid-datalayout21.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+target datalayout = "p:64:64:24"
+
+; CHECK: Pointer preferred alignment must be a power of 2
+
OpenPOWER on IntegriCloud