forked from OSchip/llvm-project
GlobalISel: mark incoming landing-pad registers as live.
Should fix machine verifier failures. llvm-svn: 293334
This commit is contained in:
parent
78aacbe2f9
commit
c9bc8a5580
|
@ -759,6 +759,7 @@ bool IRTranslator::translateLandingPad(const User &U,
|
|||
SmallVector<unsigned, 2> Regs;
|
||||
SmallVector<uint64_t, 2> Offsets;
|
||||
if (unsigned Reg = TLI.getExceptionPointerRegister(PersonalityFn)) {
|
||||
MBB.addLiveIn(Reg);
|
||||
unsigned VReg = MRI->createGenericVirtualRegister(Tys[0]);
|
||||
MIRBuilder.buildCopy(VReg, Reg);
|
||||
Regs.push_back(VReg);
|
||||
|
@ -766,6 +767,7 @@ bool IRTranslator::translateLandingPad(const User &U,
|
|||
}
|
||||
|
||||
if (unsigned Reg = TLI.getExceptionSelectorRegister(PersonalityFn)) {
|
||||
MBB.addLiveIn(Reg);
|
||||
unsigned VReg = MRI->createGenericVirtualRegister(Tys[1]);
|
||||
MIRBuilder.buildCopy(VReg, Reg);
|
||||
Regs.push_back(VReg);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: llc -O0 -mtriple=aarch64-apple-ios -global-isel -stop-after=legalizer %s -o - | FileCheck %s
|
||||
; RUN: llc -O0 -mtriple=aarch64-apple-ios -verify-machineinstrs -global-isel -stop-after=legalizer %s -o - | FileCheck %s
|
||||
|
||||
@_ZTIi = external global i8*
|
||||
|
||||
|
|
Loading…
Reference in New Issue