From b8685cf3042f6a2e129061922bd6b18e3c42258e Mon Sep 17 00:00:00 2001 From: Dávid Bolvanský Date: Sun, 3 Nov 2019 20:13:45 +0100 Subject: [InstructionCompares] Fixed null check after dereferencing warning. NFCI. --- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 5fb3ec87571..23f4e1342da 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -3817,6 +3817,7 @@ Instruction *InstCombiner::foldICmpBinOp(ICmpInst &I, const SimplifyQuery &SQ) { // if C2 has greater magnitude than C1: // icmp (A + C1), (C + C2) -> icmp A, (C + C3) // s.t. C3 = C2 - C1 + assert(BO0 && BO1); if (A && C && NoOp0WrapProblem && NoOp1WrapProblem && (BO0->hasOneUse() || BO1->hasOneUse()) && !I.isUnsigned()) if (ConstantInt *C1 = dyn_cast(B)) -- cgit v1.2.3