From 59bc99a08a69217b6a6de5df7ef99b0be7e3e1f4 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 5 May 2020 11:47:43 -0400 Subject: [PATCH] InstCombine: Fix return after else --- llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 276f377..281ae6c 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -419,11 +419,11 @@ Instruction *InstCombiner::visitAllocaInst(AllocaInst &AI) { eraseInstFromFunction(*Copy); ++NumGlobalCopies; return NewI; - } else { - PointerReplacer PtrReplacer(*this); - PtrReplacer.replacePointer(AI, Cast); - ++NumGlobalCopies; } + + PointerReplacer PtrReplacer(*this); + PtrReplacer.replacePointer(AI, Cast); + ++NumGlobalCopies; } } } -- 2.7.4