[llvm-commits] [llvm] r50461 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Scott Michel
scottm at aero.org
Tue Apr 29 17:26:38 PDT 2008
Author: pingbak
Date: Tue Apr 29 19:26:38 2008
New Revision: 50461
URL: http://llvm.org/viewvc/llvm-project?rev=50461&view=rev
Log:
Fix custom target lowering for zero/any/sign_extend: make sure that
DAG.UpdateNodeOperands() is called before (not after) the call to
TLI.LowerOperation().
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=50461&r1=50460&r2=50461&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Apr 29 19:26:38 2008
@@ -3874,14 +3874,12 @@
case Expand: assert(0 && "Shouldn't need to expand other operators here!");
case Legal:
Tmp1 = LegalizeOp(Node->getOperand(0));
+ Result = DAG.UpdateNodeOperands(Result, Tmp1);
if (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)) ==
TargetLowering::Custom) {
- Tmp2 = TLI.LowerOperation(Result, DAG);
- if (Tmp2.Val) {
- Tmp1 = Tmp2;
- }
+ Tmp1 = TLI.LowerOperation(Result, DAG);
+ if (Tmp1.Val) Result = Tmp1;
}
- Result = DAG.UpdateNodeOperands(Result, Tmp1);
break;
case Promote:
switch (Node->getOpcode()) {
More information about the llvm-commits
mailing list