Define a maximum supported alignment value for load, store, and
authorDan Gohman <gohman@apple.com>
Wed, 28 Jul 2010 20:12:04 +0000 (20:12 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 28 Jul 2010 20:12:04 +0000 (20:12 +0000)
commit138aa2a82bc6de611f28e51332fb0a30262a58e3
tree9457512df2e0e69b34681b03b8baede85785395c
parenta0c5bf19bff7d06faa3e039a0638806c9e5a8ff6
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
include/llvm/Instructions.h
lib/AsmParser/LLParser.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/VMCore/Instructions.cpp
test/Assembler/align-inst-alloca.ll [new file with mode: 0644]
test/Assembler/align-inst-load.ll [new file with mode: 0644]
test/Assembler/align-inst-store.ll [new file with mode: 0644]
test/Assembler/align-inst.ll [new file with mode: 0644]