mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
Check Reg against zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6691a8935c
commit
1deef27b0a
@ -3699,7 +3699,7 @@ SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI,
|
||||
unsigned Reg = 0;
|
||||
if (N.getOpcode() == ISD::CopyFromReg) {
|
||||
Reg = cast<RegisterSDNode>(N.getOperand(1))->getReg();
|
||||
if (TargetRegisterInfo::isVirtualRegister(Reg)) {
|
||||
if (Reg && TargetRegisterInfo::isVirtualRegister(Reg)) {
|
||||
MachineRegisterInfo &RegInfo = MF.getRegInfo();
|
||||
unsigned PR = RegInfo.getLiveInPhysReg(Reg);
|
||||
if (PR)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user