aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-19 23:12:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-19 23:12:38 +0000
commit898101c15fa11a896deb4e2fcb73b4727e1dcc1f (patch)
treea0c1497e61e91866bd68be9682f7fb19067d5433 /lib/CodeGen
parent115c036a4c83cd277ffac0867a21b34f63829db7 (diff)
X86 conditional branch support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index d575ee617f..bdc49513eb 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -883,6 +883,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
Result = LegalizeOp(Result); // Relegalize new nodes.
break;
+ case TargetLowering::Custom: {
+ SDOperand Tmp =
+ TLI.LowerOperation(DAG.getNode(ISD::BRCOND, Node->getValueType(0),
+ Tmp1, Tmp2, Node->getOperand(2)), DAG);
+ if (Tmp.Val) {
+ Result = LegalizeOp(Tmp);
+ break;
+ }
+ // FALLTHROUGH if the target thinks it is legal.
+ }
case TargetLowering::Legal:
// Basic block destination (Op#2) is always legal.
if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1))