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

canClobberPhysRegDefs shouldn't called without checking hasPhysRegDefs;

check this with an assert.

llvm-svn: 52603
This commit is contained in:
Dan Gohman 2008-06-21 22:05:24 +00:00
parent e6da01721b
commit 4d2c1733d7

View File

@ -1572,15 +1572,14 @@ static bool hasCopyToRegUse(SUnit *SU) {
}
/// canClobberPhysRegDefs - True if SU would clobber one of SuccSU's
/// physical register def.
/// physical register defs.
static bool canClobberPhysRegDefs(SUnit *SuccSU, SUnit *SU,
const TargetInstrInfo *TII,
const TargetRegisterInfo *TRI) {
SDNode *N = SuccSU->Node;
unsigned NumDefs = TII->get(N->getTargetOpcode()).getNumDefs();
const unsigned *ImpDefs = TII->get(N->getTargetOpcode()).getImplicitDefs();
if (!ImpDefs)
return false;
assert(ImpDefs && "Caller should check hasPhysRegDefs");
const unsigned *SUImpDefs =
TII->get(SU->Node->getTargetOpcode()).getImplicitDefs();
if (!SUImpDefs)