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
This commit is contained in:
Dan Gohman 2010-01-04 20:52:50 +00:00
parent 9ef51c8011
commit 3cc4a307a8

View File

@ -5612,7 +5612,7 @@ SDValue X86TargetLowering::EmitTest(SDValue Op, unsigned X86CC,
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;