X86 lowers SELECT to a cmp / test followed by a conditional move.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2005-12-17 01:21:05 +00:00
parent bcecf33dc2
commit 7df96d6672
3 changed files with 39 additions and 1 deletions

View File

@@ -1325,6 +1325,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Tmp2, Tmp3, ISD::SETNE);
}
break;
case TargetLowering::Custom: {
SDOperand Tmp =
TLI.LowerOperation(DAG.getNode(ISD::SELECT, Node->getValueType(0),
Tmp1, Tmp2, Tmp3), DAG);
if (Tmp.Val) {
Result = LegalizeOp(Tmp);
break;
}
// FALLTHROUGH if the target thinks it is legal.
}
case TargetLowering::Legal:
if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1) ||
Tmp3 != Node->getOperand(2))