diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-03 16:15:50 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-03 16:15:50 +0000 |
commit | 795e70e4319bb38eb92701c2a463eeb7584a9b25 (patch) | |
tree | c0093acc7991a8b675520cb8f493b99160fba78f | |
parent | c677c5d6958c07d2126e05e696e8c086ac8c5c38 (diff) | |
download | external_llvm-795e70e4319bb38eb92701c2a463eeb7584a9b25.zip external_llvm-795e70e4319bb38eb92701c2a463eeb7584a9b25.tar.gz external_llvm-795e70e4319bb38eb92701c2a463eeb7584a9b25.tar.bz2 |
Use unary + instead of a separate local variable for working
around std::min vs static const friction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110112 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 27ca345..52277a0 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -109,10 +109,9 @@ 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, MaxAlign); + Align = std::min(Align, +Value::MaximumAlignment); if (PrefAlign > Align) Align = EnforceKnownAlignment(V, Align, PrefAlign); |