A use by operand 1 or 2 of a SELECT is not a FLAGS use. This
lets the test-elimination work in more conditional-move cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92508 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index c722fbf..ef98a2c 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -5612,7 +5612,7 @@
       for (SDNode::use_iterator UI = Op.getNode()->use_begin(),
            UE = Op.getNode()->use_end(); UI != UE; ++UI)
         if (UI->getOpcode() != ISD::BRCOND &&
-            UI->getOpcode() != ISD::SELECT &&
+            (UI->getOpcode() != ISD::SELECT || UI.getOperandNo() != 0) &&
             UI->getOpcode() != ISD::SETCC) {
           NonFlagUse = true;
           break;