Fix bug: 2004-10-08-SelectSetCCFold.llx.  Normally this is hidden by the
instcombine xform, which is why we didn't notice it before.

llvm-svn: 16840
diff --git a/llvm/lib/Target/X86/X86ISelSimple.cpp b/llvm/lib/Target/X86/X86ISelSimple.cpp
index 71607b4..ff0ba75 100644
--- a/llvm/lib/Target/X86/X86ISelSimple.cpp
+++ b/llvm/lib/Target/X86/X86ISelSimple.cpp
@@ -847,7 +847,8 @@
       if ((isa<BranchInst>(User) || isa<SelectInst>(User)) &&
           (getClassB(SCI->getOperand(0)->getType()) != cLong ||
            SCI->getOpcode() == Instruction::SetEQ ||
-           SCI->getOpcode() == Instruction::SetNE))
+           SCI->getOpcode() == Instruction::SetNE) &&
+          User->getOperand(0) == V)
         return SCI;
     }
   return 0;