mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Check Reg against zero.
llvm-svn: 102573
This commit is contained in:
parent
4137a14e18
commit
d08e8f2b24
@ -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