Fix bugs found with recent addition of assertions in

MRegisterInfo::is{Physical,Virtual}Register.

llvm-svn: 11849
This commit is contained in:
Alkis Evlogimenos 2004-02-25 23:21:52 +00:00
parent 6ce59b4a03
commit e62ddd405d
2 changed files with 9 additions and 9 deletions

View File

@ -304,20 +304,20 @@ if test ${enableval} = "no"
then
if test -d /home/vadve/shared/benchmarks/speccpu2000/benchspec
then
AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
AC_SUBST(USE_SPEC,[[USE_SPEC=1]])
AC_SUBST(SPEC2000_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
AC_SUBST(USE_SPEC2000,[[USE_SPEC2000=1]])
else
AC_SUBST(USE_SPEC,[[]])
AC_SUBST(SPEC_ROOT,[])
AC_SUBST(USE_SPEC2000,[[]])
AC_SUBST(SPEC2000_ROOT,[])
fi
else
if test ${enableval} = ""
then
AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
AC_SUBST(SPEC2000_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec])
else
AC_SUBST(SPEC_ROOT,[${enableval}])
AC_SUBST(SPEC2000_ROOT,[${enableval}])
fi
AC_SUBST(USE_SPEC,[[USE_SPEC=1]])
AC_SUBST(USE_SPEC2000,[[USE_SPEC2000=1]])
fi
dnl Spec 95 Benchmarks

View File

@ -168,7 +168,7 @@ namespace {
// rewrite all used operands
for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) {
MachineOperand& op = mii->getOperand(i);
if (op.isRegister() && op.isUse() &&
if (op.isRegister() && op.getReg() && op.isUse() &&
MRegisterInfo::isVirtualRegister(op.getReg())) {
unsigned physReg = vrm_.getPhys(op.getReg());
handleUse(mbb, mii, op.getReg(), physReg);
@ -187,7 +187,7 @@ namespace {
// uses so don't check for those here)
for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) {
MachineOperand& op = mii->getOperand(i);
if (op.isRegister() && !op.isUse())
if (op.isRegister() && op.getReg() && !op.isUse())
if (MRegisterInfo::isPhysicalRegister(op.getReg()))
vacatePhysReg(mbb, mii, op.getReg());
else {