diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-29 00:59:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-29 00:59:34 +0000 |
commit | 1deef27b0ad538e5017675cf1e085002973bbbb2 (patch) | |
tree | c83d623e254d159558ae125c196b0a2f69bca488 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 6691a8935c9f2e049ff5eed45ba2894f60108909 (diff) | |
download | external_llvm-1deef27b0ad538e5017675cf1e085002973bbbb2.zip external_llvm-1deef27b0ad538e5017675cf1e085002973bbbb2.tar.gz external_llvm-1deef27b0ad538e5017675cf1e085002973bbbb2.tar.bz2 |
Check Reg against zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index adb321d..88245de 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -222,6 +222,8 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { for (unsigned i = 0, e = FuncInfo->ArgDbgValues.size(); i != e; ++i) { MachineInstr *MI = FuncInfo->ArgDbgValues[e-i-1]; unsigned Reg = MI->getOperand(0).getReg(); + if (!Reg) + continue; if (TargetRegisterInfo::isPhysicalRegister(Reg)) EntryMBB->insert(EntryMBB->begin(), MI); else { |