From 50d9d7764392e73f657930415b631c56f9154902 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 10 Sep 2007 23:46:29 +0000 Subject: [PATCH] remove some dead code, this is handled by constant folding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41819 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index f9abafa34c0..8c56b7a0d05 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4691,14 +4691,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { if (isa(Op1)) // X icmp undef -> undef return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty)); - // icmp of GlobalValues can never equal each other as long as they aren't - // external weak linkage type. - if (GlobalValue *GV0 = dyn_cast(Op0)) - if (GlobalValue *GV1 = dyn_cast(Op1)) - if (!GV0->hasExternalWeakLinkage() || !GV1->hasExternalWeakLinkage()) - return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, - !isTrueWhenEqual(I))); - // icmp , - Global/Stack value // addresses never equal each other! We already know that Op0 != Op1. if ((isa(Op0) || isa(Op0) || @@ -6399,6 +6391,7 @@ static bool CanEvaluateInDifferentType(Value *V, const IntegerType *Ty, // of casts in the input. if (I->getOpcode() == CastOpc) return true; + break; default: // TODO: Can handle more cases here. -- 2.34.1