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 | 10e4bdf5d1cf60d1c7bbfbb780996290fc2b94a7 (patch) | |
tree | 0ec9c9abcf4fd571bb49df7b3ca9af7228a5acb5 /lib | |
parent | 819d91a9ef1abfcd87949608831af0234c47cc05 (diff) | |
download | external_llvm-10e4bdf5d1cf60d1c7bbfbb780996290fc2b94a7.zip external_llvm-10e4bdf5d1cf60d1c7bbfbb780996290fc2b94a7.tar.gz external_llvm-10e4bdf5d1cf60d1c7bbfbb780996290fc2b94a7.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c9b334f..7e7a2f4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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())); + } } |