summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2003-07-06 22:50:31 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2003-07-06 22:50:31 +0000
commit9c570ee12904cfca974372dfda5fe9c75cee83b4 (patch)
tree4bb0131284abfa31d13df59fd0044d25772e3c74 /lib
parent97539fc4b63031495cbee5441de7a3a583e5ec77 (diff)
downloadllvm-9c570ee12904cfca974372dfda5fe9c75cee83b4.tar.gz
llvm-9c570ee12904cfca974372dfda5fe9c75cee83b4.tar.bz2
llvm-9c570ee12904cfca974372dfda5fe9c75cee83b4.tar.xz
Correction to last fix: Pointer types do not return true in Type::IsIntegral().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/SparcV9/SparcV9RegClassInfo.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
index 1640dcab6c..8c20ab04c8 100644
--- a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
@@ -136,17 +136,20 @@ void SparcIntCCRegClass::colorIGNode(IGNode *Node,
// Choose whether to use %xcc or %icc based on type of value compared
const LiveRange* ccLR = Node->getParentLR();
const Type* setCCType = (* ccLR->begin())->getType(); // any Value in LR
- assert(setCCType->isIntegral());
- int ccReg = (setCCType == Type::LongTy)? xcc : icc;
+ assert(setCCType->isIntegral() || isa<PointerType>(setCCType));
+ int ccReg = ((isa<PointerType>(setCCType) || setCCType == Type::LongTy)
+ ? xcc : icc);
#ifndef NDEBUG
// Let's just make sure values of two different types have not been
// coalesced into this LR.
- for (ValueSet::const_iterator I=ccLR->begin(), E=ccLR->end(); I != E; ++I)
- assert(setCCType->isIntegral() &&
- ((ccReg == xcc && (*I)->getType() == Type::LongTy) ||
- (ccReg == icc && (*I)->getType() != Type::LongTy))
+ for (ValueSet::const_iterator I=ccLR->begin(), E=ccLR->end(); I!=E; ++I) {
+ const Type* ccType = (*I)->getType();
+ assert((ccReg == xcc && (isa<PointerType>(ccType)
+ || ccType == Type::LongTy)) ||
+ (ccReg == icc && ccType->isIntegral() && ccType != Type::LongTy)
&& "Comparisons needing different intCC regs coalesced in LR!");
+ }
#endif
Node->setColor(ccReg); // only one int cc reg is available