mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Fix custom target lowering for zero/any/sign_extend: make sure that
DAG.UpdateNodeOperands() is called before (not after) the call to TLI.LowerOperation(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7b251e0474
commit
82747a5484
@ -3874,14 +3874,12 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user