diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 3979d3d..614c8bb 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -1444,17 +1444,9 @@ static void computeKnownBitsFromOperator(const Operator *I, Known.Zero.setHighBits(Leaders); break; } - - case Instruction::Alloca: { - const AllocaInst *AI = cast<AllocaInst>(I); - unsigned Align = AI->getAlignment(); - if (Align == 0) - Align = Q.DL.getABITypeAlignment(AI->getAllocatedType()); - - if (Align > 0) - Known.Zero.setLowBits(countTrailingZeros(Align)); + case Instruction::Alloca: + Known.Zero.setLowBits(Log2(cast<AllocaInst>(I)->getAlign())); break; - } case Instruction::GetElementPtr: { // Analyze all of the subscripts of this getelementptr instruction // to determine if we can prove known low zero bits. |