mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -136,17 +136,20 @@ void SparcIntCCRegClass::colorIGNode(IGNode *Node,
|
|||||||
// Choose whether to use %xcc or %icc based on type of value compared
|
// Choose whether to use %xcc or %icc based on type of value compared
|
||||||
const LiveRange* ccLR = Node->getParentLR();
|
const LiveRange* ccLR = Node->getParentLR();
|
||||||
const Type* setCCType = (* ccLR->begin())->getType(); // any Value in LR
|
const Type* setCCType = (* ccLR->begin())->getType(); // any Value in LR
|
||||||
assert(setCCType->isIntegral());
|
assert(setCCType->isIntegral() || isa<PointerType>(setCCType));
|
||||||
int ccReg = (setCCType == Type::LongTy)? xcc : icc;
|
int ccReg = ((isa<PointerType>(setCCType) || setCCType == Type::LongTy)
|
||||||
|
? xcc : icc);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
// Let's just make sure values of two different types have not been
|
// Let's just make sure values of two different types have not been
|
||||||
// coalesced into this LR.
|
// coalesced into this LR.
|
||||||
for (ValueSet::const_iterator I=ccLR->begin(), E=ccLR->end(); I != E; ++I)
|
for (ValueSet::const_iterator I=ccLR->begin(), E=ccLR->end(); I!=E; ++I) {
|
||||||
assert(setCCType->isIntegral() &&
|
const Type* ccType = (*I)->getType();
|
||||||
((ccReg == xcc && (*I)->getType() == Type::LongTy) ||
|
assert((ccReg == xcc && (isa<PointerType>(ccType)
|
||||||
(ccReg == icc && (*I)->getType() != Type::LongTy))
|
|| ccType == Type::LongTy)) ||
|
||||||
|
(ccReg == icc && ccType->isIntegral() && ccType != Type::LongTy)
|
||||||
&& "Comparisons needing different intCC regs coalesced in LR!");
|
&& "Comparisons needing different intCC regs coalesced in LR!");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Node->setColor(ccReg); // only one int cc reg is available
|
Node->setColor(ccReg); // only one int cc reg is available
|
||||||
|
Reference in New Issue
Block a user