mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-04 09:11:43 +00:00
SrcDef is only written and never read. Remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f56138d4ae
commit
7becbc41ab
@ -295,7 +295,6 @@ bool PeepholeOptimizer::OptimizeBitcastInstr(MachineInstr *MI,
|
|||||||
if (!DefMI || !DefMI->getDesc().isBitcast())
|
if (!DefMI || !DefMI->getDesc().isBitcast())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
unsigned SrcDef = 0;
|
|
||||||
unsigned SrcSrc = 0;
|
unsigned SrcSrc = 0;
|
||||||
NumDefs = DefMI->getDesc().getNumDefs();
|
NumDefs = DefMI->getDesc().getNumDefs();
|
||||||
NumSrcs = DefMI->getDesc().getNumOperands() - NumDefs;
|
NumSrcs = DefMI->getDesc().getNumOperands() - NumDefs;
|
||||||
@ -308,14 +307,14 @@ bool PeepholeOptimizer::OptimizeBitcastInstr(MachineInstr *MI,
|
|||||||
unsigned Reg = MO.getReg();
|
unsigned Reg = MO.getReg();
|
||||||
if (!Reg)
|
if (!Reg)
|
||||||
continue;
|
continue;
|
||||||
if (MO.isDef())
|
if (!MO.isDef()) {
|
||||||
SrcDef = Reg;
|
if (SrcSrc)
|
||||||
else if (SrcSrc)
|
|
||||||
// Multiple sources?
|
// Multiple sources?
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
SrcSrc = Reg;
|
SrcSrc = Reg;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (MRI->getRegClass(SrcSrc) != MRI->getRegClass(Def))
|
if (MRI->getRegClass(SrcSrc) != MRI->getRegClass(Def))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user