mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add support to codegen for getresult instructions with undef operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3311,8 +3311,13 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
|
||||
|
||||
void SelectionDAGLowering::visitGetResult(GetResultInst &I) {
|
||||
SDOperand Call = getValue(I.getOperand(0));
|
||||
setValue(&I, SDOperand(Call.Val, I.getIndex()));
|
||||
if (UndefValue *UV = dyn_cast<UndefValue>(I.getOperand(0))) {
|
||||
SDOperand Undef = DAG.getNode(ISD::UNDEF, TLI.getValueType(I.getType()));
|
||||
setValue(&I, Undef);
|
||||
} else {
|
||||
SDOperand Call = getValue(I.getOperand(0));
|
||||
setValue(&I, SDOperand(Call.Val, I.getIndex()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user