diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 92b7f1a39bc..18de1269e9d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2035,7 +2035,7 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) { New = new MallocInst(CastElTy, Amt, Name); else New = new AllocaInst(CastElTy, Amt, Name); - InsertNewInstBefore(New, CI); + InsertNewInstBefore(New, *AI); return ReplaceInstUsesWith(CI, New); } } |