OSDN Git Service

Use DL preferred alignment for alloca in Value::getPointerAlignment
authorArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 27 Apr 2016 10:42:29 +0000 (10:42 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 27 Apr 2016 10:42:29 +0000 (10:42 +0000)
commit5f2b68d8958084a03106ddf28bea48a23a9f26c8
treeb7b4c1486ed7412e3a6ff150f43d42c1b3cdd61d
parentc81188d21efdc1ff0c096df7d7da2f34706d3b93
Use DL preferred alignment for alloca in Value::getPointerAlignment

Teach Value::getPointerAlignment that allocas with no explicit alignment are aligned to preferred alignment of the allocated type.

Reviewed By: hfinkel

Differential Revision: http://reviews.llvm.org/D17569

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267689 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Value.cpp
test/Analysis/ValueTracking/memory-dereferenceable.ll