mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
isSubRegOf() is a dup of isSubRegister.
llvm-svn: 43249
This commit is contained in:
parent
0590c75f18
commit
dc2f1b1741
@ -375,17 +375,6 @@ public:
|
||||
return get(RegNo).SuperRegs;
|
||||
}
|
||||
|
||||
/// isSubRegOf - Predicate which returns true if RegA is a sub-register of
|
||||
/// RegB. Returns false otherwise.
|
||||
///
|
||||
bool isSubRegOf(unsigned RegA, unsigned RegB) const {
|
||||
const TargetRegisterDesc &RD = (*this)[RegA];
|
||||
for (const unsigned *reg = RD.SuperRegs; *reg != 0; ++reg)
|
||||
if (*reg == RegB)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getName - Return the symbolic target specific name for the specified
|
||||
/// physical register.
|
||||
const char *getName(unsigned RegNo) const {
|
||||
|
@ -146,7 +146,7 @@ bool LowerSubregsInstructionPass::LowerInsert(MachineInstr *MI) {
|
||||
// of the destination, we copy the subreg into the source
|
||||
// However, this is only safe if the insert instruction is the kill
|
||||
// of the source register
|
||||
bool revCopyOrder = MRI.isSubRegOf(InsReg, DstReg);
|
||||
bool revCopyOrder = MRI.isSubRegister(DstReg, InsReg);
|
||||
if (revCopyOrder && InsReg != DstSubReg) {
|
||||
if (MI->getOperand(1).isKill()) {
|
||||
DstSubReg = MRI.getSubReg(SrcReg, SubIdx);
|
||||
|
Loading…
Reference in New Issue
Block a user