[llvm] r293334 - GlobalISel: mark incoming landing-pad registers as live.
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 13:31:17 PST 2017
Author: tnorthover
Date: Fri Jan 27 15:31:17 2017
New Revision: 293334
URL: http://llvm.org/viewvc/llvm-project?rev=293334&view=rev
Log:
GlobalISel: mark incoming landing-pad registers as live.
Should fix machine verifier failures.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=293334&r1=293333&r2=293334&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Fri Jan 27 15:31:17 2017
@@ -759,6 +759,7 @@ bool IRTranslator::translateLandingPad(c
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(c
}
if (unsigned Reg = TLI.getExceptionSelectorRegister(PersonalityFn)) {
+ MBB.addLiveIn(Reg);
unsigned VReg = MRI->createGenericVirtualRegister(Tys[1]);
MIRBuilder.buildCopy(VReg, Reg);
Regs.push_back(VReg);
Modified: llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll?rev=293334&r1=293333&r2=293334&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/legalize-exceptions.ll Fri Jan 27 15:31:17 2017
@@ -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*
More information about the llvm-commits
mailing list