registers not saved in certain blocks. Use explicit getCalleeSavedInfo
and isLiveIn instead.
This fixes pr32292.
Patch by Tim Shen!
llvm-svn: 299124
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);