From 2949a2398c22580de3705fec568e1a73b818e962 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 20 Sep 2009 03:48:46 +0000 Subject: [PATCH] Remove dead store by taking a guess at what Chris meant. I wasn't able to design a testcase that would tickle this behaviour. llvm-svn: 82357 --- llvm/lib/VMCore/ConstantFold.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 7bf4f094e80c..773a908cf839 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/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;