[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Wed Nov 29 11:14:02 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.420 -> 1.421
---
Log message:
Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
---
Diffs of the changes: (+8 -3)
LegalizeDAG.cpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.420 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.421
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.420 Wed Nov 29 02:26:18 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Nov 29 13:13:47 2006
@@ -1850,16 +1850,21 @@
switch (TLI.getOperationAction(ISD::READCYCLECOUNTER,
Node->getValueType(0))) {
default: assert(0 && "This action is not supported yet!");
- case TargetLowering::Legal: break;
+ case TargetLowering::Legal:
+ Tmp1 = Result.getValue(0);
+ Tmp2 = Result.getValue(1);
+ break;
case TargetLowering::Custom:
Result = TLI.LowerOperation(Result, DAG);
+ Tmp1 = LegalizeOp(Result.getValue(0));
+ Tmp2 = LegalizeOp(Result.getValue(1));
break;
}
// Since rdcc produce two values, make sure to remember that we legalized
// both of them.
- AddLegalizedOperand(SDOperand(Node, 0), LegalizeOp(Result.getValue(0)));
- AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Result.getValue(1)));
+ AddLegalizedOperand(SDOperand(Node, 0), Tmp1);
+ AddLegalizedOperand(SDOperand(Node, 1), Tmp2);
return Result;
case ISD::SELECT:
More information about the llvm-commits
mailing list