[llvm-commits] [llvm] r41819 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Mon Sep 10 16:46:29 PDT 2007
Author: lattner
Date: Mon Sep 10 18:46:29 2007
New Revision: 41819
URL: http://llvm.org/viewvc/llvm-project?rev=41819&view=rev
Log:
remove some dead code, this is handled by constant folding.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=41819&r1=41818&r2=41819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Sep 10 18:46:29 2007
@@ -4691,14 +4691,6 @@
if (isa<UndefValue>(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<GlobalValue>(Op0))
- if (GlobalValue *GV1 = dyn_cast<GlobalValue>(Op1))
- if (!GV0->hasExternalWeakLinkage() || !GV1->hasExternalWeakLinkage())
- return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty,
- !isTrueWhenEqual(I)));
-
// icmp <global/alloca*/null>, <global/alloca*/null> - Global/Stack value
// addresses never equal each other! We already know that Op0 != Op1.
if ((isa<GlobalValue>(Op0) || isa<AllocaInst>(Op0) ||
@@ -6399,6 +6391,7 @@
// of casts in the input.
if (I->getOpcode() == CastOpc)
return true;
+
break;
default:
// TODO: Can handle more cases here.
More information about the llvm-commits
mailing list