registers not saved in certain blocks. Use explicit getCalleeSavedInfo
and isLiveIn instead.
This fixes pr32292.
Patch by Tim Shen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299124
91177308-0d34-0410-b5e6-
96231b3b80d8
C = cast<Constant>(V);
return false;
}
+ case ValID::t_Null:
+ C = Constant::getNullValue(Ty);
+ return false;
default:
return Error(Loc, "expected a constant value");
}
for (const MCPhysReg *I = MF.getRegInfo().getCalleeSavedRegs(); *I;
++I) {
unsigned Reg = *I;
- if (!IsReturnBlock && !Pristine.test(Reg)) continue;
+ if (!IsReturnBlock && !(Pristine.test(Reg) || BB->isLiveIn(Reg)))
+ continue;
for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) {
unsigned AliasReg = *AI;
State->UnionGroups(AliasReg, 0);
BitVector Pristine = MFI.getPristineRegs(MF);
for (const MCPhysReg *I = MF.getRegInfo().getCalleeSavedRegs(); *I;
++I) {
- if (!IsReturnBlock && !Pristine.test(*I)) continue;
+ unsigned Reg = *I;
+ if (!IsReturnBlock && !(Pristine.test(Reg) || BB->isLiveIn(Reg)))
+ continue;
for (MCRegAliasIterator AI(*I, TRI, true); AI.isValid(); ++AI) {
unsigned Reg = *AI;
Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);