aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler/align-inst-store.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-28 20:12:04 +0000
committerDan Gohman <gohman@apple.com>2010-07-28 20:12:04 +0000
commit8c7440ccbd345715f00a66dd702af361b60f64ae (patch)
tree9457512df2e0e69b34681b03b8baede85785395c /test/Assembler/align-inst-store.ll
parent6940dd54825f3884155612630a7967af8fccb05b (diff)
downloadexternal_llvm-8c7440ccbd345715f00a66dd702af361b60f64ae.zip
external_llvm-8c7440ccbd345715f00a66dd702af361b60f64ae.tar.gz
external_llvm-8c7440ccbd345715f00a66dd702af361b60f64ae.tar.bz2
Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding), and add error checking for it. Fix an instcombine bug which generated huge alignment values (null is infinitely aligned). This fixes undefined behavior noticed by John Regehr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler/align-inst-store.ll')
-rw-r--r--test/Assembler/align-inst-store.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Assembler/align-inst-store.ll b/test/Assembler/align-inst-store.ll
new file mode 100644
index 0000000..8c3b712
--- /dev/null
+++ b/test/Assembler/align-inst-store.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as %s -o /dev/null 2>/dev/null
+
+define void @foo() {
+ store i1 false, i1* %p, align 1073741824
+ ret void
+}