diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index ce03bc066c6e2..1db01b2716a09 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -4225,9 +4225,8 @@ bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) { return false; // Early exit. - if (!isa(I->getOperand(OpIdx))) { + if (!isa(I->getOperand(OpIdx))) return true; - } switch (I->getOpcode()) { default: