From e3fcabe0681fe0d759593b1bcfab527f730778d8 Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Wed, 25 Feb 2004 23:21:52 +0000 Subject: [PATCH] Fix bugs found with recent addition of assertions in MRegisterInfo::is{Physical,Virtual}Register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11849 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/configure.ac | 14 +++++++------- lib/CodeGen/VirtRegMap.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index e919ba81a42..2a7516a8308 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -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 diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 4f06c6730fc..e8225e2b190 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -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 {