summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-01-27 21:31:17 +0000
committerTim Northover <tnorthover@apple.com>2017-01-27 21:31:17 +0000
commitc9bc8a55809d831d8a54381bfdebc88b8a0ed38c (patch)
treeaa6e2919565cd221d1048e8018b8edccb57073a3 /llvm/lib
parent78aacbe2f9e26ba327a5d97e6e79f24b547db8c6 (diff)
downloadbcm5719-llvm-c9bc8a55809d831d8a54381bfdebc88b8a0ed38c.tar.gz
bcm5719-llvm-c9bc8a55809d831d8a54381bfdebc88b8a0ed38c.zip
GlobalISel: mark incoming landing-pad registers as live.
Should fix machine verifier failures. llvm-svn: 293334
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 4a642f44cb3..ce3e682f14e 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -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);
OpenPOWER on IntegriCloud