mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Fix legalization of intrinsics with chain and result values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -564,8 +564,19 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
|||||||
TargetLowering::Custom) {
|
TargetLowering::Custom) {
|
||||||
Tmp3 = TLI.LowerOperation(Result, DAG);
|
Tmp3 = TLI.LowerOperation(Result, DAG);
|
||||||
if (Tmp3.Val) Result = Tmp3;
|
if (Tmp3.Val) Result = Tmp3;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
if (Result.Val->getNumValues() == 1) break;
|
||||||
|
|
||||||
|
// Must have return value and chain result.
|
||||||
|
assert(Result.Val->getNumValues() == 2 &&
|
||||||
|
"Cannot return more than two values!");
|
||||||
|
|
||||||
|
// Since loads produce two values, make sure to remember that we
|
||||||
|
// legalized both of them.
|
||||||
|
AddLegalizedOperand(SDOperand(Node, 0), Result.getValue(0));
|
||||||
|
AddLegalizedOperand(SDOperand(Node, 1), Result.getValue(1));
|
||||||
|
return Result.getValue(Op.ResNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
case ISD::LOCATION:
|
case ISD::LOCATION:
|
||||||
|
Reference in New Issue
Block a user