From: Nick Lewycky Date: Sun, 20 Sep 2009 03:48:46 +0000 (+0000) Subject: Remove dead store by taking a guess at what Chris meant. I wasn't able to X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d43737bd0935150de2e3f385ad8418f2f3a7d2a2;p=oota-llvm.git Remove dead store by taking a guess at what Chris meant. I wasn't able to design a testcase that would tickle this behaviour. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82357 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 7bf4f094e80..773a908cf83 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -1241,12 +1241,11 @@ static ICmpInst::Predicate evaluateICmpRelation(LLVMContext &Context, // null pointer, do the comparison with the pre-casted value. if (V2->isNullValue() && (isa(CE1->getType()) || CE1->getType()->isInteger())) { - bool sgnd = isSigned; if (CE1->getOpcode() == Instruction::ZExt) isSigned = false; if (CE1->getOpcode() == Instruction::SExt) isSigned = true; return evaluateICmpRelation(Context, CE1Op0, Constant::getNullValue(CE1Op0->getType()), - sgnd); + isSigned); } break;