summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-30 21:07:05 +0000
committerDan Gohman <gohman@apple.com>2010-07-30 21:07:05 +0000
commite16829b401409b398c9de9847c1d12eb931f7d63 (patch)
tree41b6c288fd5caa25309550991ac501b4c6250c84 /lib/Transforms/InstCombine
parent81881bcd35ad944a8f8e14b8c5c05096cabd98c7 (diff)
downloadllvm-e16829b401409b398c9de9847c1d12eb931f7d63.tar.gz
llvm-e16829b401409b398c9de9847c1d12eb931f7d63.tar.bz2
llvm-e16829b401409b398c9de9847c1d12eb931f7d63.tar.xz
Move MaximumAlignment to be a member of the Value class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCalls.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index fdb2dd693d..27ca345b06 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -109,9 +109,10 @@ unsigned InstCombiner::GetOrEnforceKnownAlignment(Value *V,
TrailZ = std::min(TrailZ, unsigned(sizeof(unsigned) * CHAR_BIT - 1));
unsigned Align = 1u << std::min(BitWidth - 1, TrailZ);
+ unsigned MaxAlign = Value::MaximumAlignment;
// LLVM doesn't support alignments larger than this currently.
- Align = std::min(Align, MaximumAlignment);
+ Align = std::min(Align, MaxAlign);
if (PrefAlign > Align)
Align = EnforceKnownAlignment(V, Align, PrefAlign);