1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

SrcDef is only written and never read. Remove it.

llvm-svn: 136080
This commit is contained in:
Duncan Sands 2011-07-26 15:05:06 +00:00
parent 52f6e018e2
commit f74e5f1322

View File

@ -295,7 +295,6 @@ bool PeepholeOptimizer::OptimizeBitcastInstr(MachineInstr *MI,
if (!DefMI || !DefMI->getDesc().isBitcast())
return false;
unsigned SrcDef = 0;
unsigned SrcSrc = 0;
NumDefs = DefMI->getDesc().getNumDefs();
NumSrcs = DefMI->getDesc().getNumOperands() - NumDefs;
@ -308,13 +307,13 @@ bool PeepholeOptimizer::OptimizeBitcastInstr(MachineInstr *MI,
unsigned Reg = MO.getReg();
if (!Reg)
continue;
if (MO.isDef())
SrcDef = Reg;
else if (SrcSrc)
// Multiple sources?
return false;
else
SrcSrc = Reg;
if (!MO.isDef()) {
if (SrcSrc)
// Multiple sources?
return false;
else
SrcSrc = Reg;
}
}
if (MRI->getRegClass(SrcSrc) != MRI->getRegClass(Def))