From c6372cca787567d7565c97409d4e40006ce93a99 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 27 Oct 2005 06:26:26 +0000 Subject: Fix typo llvm-svn: 24033 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 1a9b9d7424a..7db409d39e2 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3844,7 +3844,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(CastInst &CI, } else if (isa(NumElements) && cast(NumElements)->getOpcode() == Instruction::Mul){ BinaryOperator *BO = cast(NumElements); - if (ConstantUInt *Scale = cast(BO->getOperand(1))) { + if (ConstantUInt *Scale = dyn_cast(BO->getOperand(1))) { // This value is scaled by 'Scale'. NumElements = BO->getOperand(0); ArraySizeScale = Scale->getValue(); -- cgit v1.2.3