summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp2
-rw-r--r--llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll2
2 files changed, 3 insertions, 1 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);
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
index 1e1cf2bd7cd..7e32a25f1dd 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
@@ -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*
OpenPOWER on IntegriCloud