summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/AArch64/AArch64FrameLowering.cpp4
-rw-r--r--llvm/test/CodeGen/AArch64/seh_funclet_x1.ll2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index 5719cf34c95..12167192ba0 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -929,9 +929,11 @@ void AArch64FrameLowering::emitPrologue(MachineFunction &MF,
// directly, and is not retrieved from X1.
if (F.hasPersonalityFn()) {
EHPersonality Per = classifyEHPersonality(F.getPersonalityFn());
- if (isAsynchronousEHPersonality(Per))
+ if (isAsynchronousEHPersonality(Per)) {
BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::COPY), AArch64::FP)
.addReg(AArch64::X1).setMIFlag(MachineInstr::FrameSetup);
+ MBB.addLiveIn(AArch64::X1);
+ }
}
return;
diff --git a/llvm/test/CodeGen/AArch64/seh_funclet_x1.ll b/llvm/test/CodeGen/AArch64/seh_funclet_x1.ll
index b6b84c0e62b..8f2a4dade30 100644
--- a/llvm/test/CodeGen/AArch64/seh_funclet_x1.ll
+++ b/llvm/test/CodeGen/AArch64/seh_funclet_x1.ll
@@ -1,4 +1,4 @@
-; RUN: llc -o - %s -mtriple=aarch64-windows | FileCheck %s
+; RUN: llc -o - %s -verify-machineinstrs -mtriple=aarch64-windows | FileCheck %s
; Windows runtime passes the establisher frame as the second argument to the
; termination handler. Check that we copy it into fp.
OpenPOWER on IntegriCloud