diff options
| author | Tim Northover <tnorthover@apple.com> | 2017-01-27 21:31:17 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2017-01-27 21:31:17 +0000 |
| commit | c9bc8a55809d831d8a54381bfdebc88b8a0ed38c (patch) | |
| tree | aa6e2919565cd221d1048e8018b8edccb57073a3 | |
| parent | 78aacbe2f9e26ba327a5d97e6e79f24b547db8c6 (diff) | |
| download | bcm5719-llvm-c9bc8a55809d831d8a54381bfdebc88b8a0ed38c.tar.gz bcm5719-llvm-c9bc8a55809d831d8a54381bfdebc88b8a0ed38c.zip | |
GlobalISel: mark incoming landing-pad registers as live.
Should fix machine verifier failures.
llvm-svn: 293334
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll | 2 |
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* |

