Delete a no-op loop.
authorReid Spencer <rspencer@reidspencer.com>
Sun, 18 Jul 2004 08:32:43 +0000 (08:32 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 18 Jul 2004 08:32:43 +0000 (08:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14965 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index 33370c33977e5271d23c249a68eaaa084d8ef702..6ade82e1bd716e17162663c78c634ef8f44fc229 100644 (file)
@@ -3103,15 +3103,6 @@ bool InstCombiner::runOnFunction(Function &F) {
       continue;
     }
 
-    // Check to see if any of the operands of this instruction are a
-    // GlobalValue.  Since they sneak in all over the place and inhibit
-    // optimization, we want to strip them out unconditionally!
-    for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
-      if (isa<GlobalValue>(I->getOperand(i))) {
-        I->setOperand(i, I->getOperand(i));
-        Changed = true;
-      }
-
     // Now that we have an instruction, try combining it to simplify it...
     if (Instruction *Result = visit(*I)) {
       ++NumCombined;