diff options
| author | Dan Gohman <gohman@apple.com> | 2008-04-23 20:21:29 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-04-23 20:21:29 +0000 | 
| commit | b418aafabf6a3199133346fd56379c776c4ea743 (patch) | |
| tree | 8f33e869a9689f4a28814e694e315b4c74a48239 /llvm/lib | |
| parent | 8f83081fea05f1a421bd2545f5b1cdc8d4f4af8f (diff) | |
| download | bcm5719-llvm-b418aafabf6a3199133346fd56379c776c4ea743.tar.gz bcm5719-llvm-b418aafabf6a3199133346fd56379c776c4ea743.zip  | |
Add support to codegen for getresult instructions with undef operands.
llvm-svn: 50180
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c9b334fc22c..7e7a2f41193 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -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())); +  }  }  | 

