mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-05 10:17:36 +00:00
[AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfp
Summary: This fixes the bug in https://reviews.llvm.org/D56747#inline-502711. Reviewers: efriedma Reviewed By: efriedma Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57614 llvm-svn: 352945
This commit is contained in:
parent
80963d31a3
commit
1bfeff1fc4
@ -482,6 +482,11 @@ static bool UpgradeX86IntrinsicFunction(Function *F, StringRef Name,
|
||||
}
|
||||
}
|
||||
|
||||
if (Name == "seh.recoverfp") {
|
||||
NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::eh_recoverfp);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -557,10 +562,6 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
|
||||
NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::thread_pointer);
|
||||
return true;
|
||||
}
|
||||
if (Name == "x86.seh.recoverfp") {
|
||||
NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::eh_recoverfp);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
11
test/CodeGen/AArch64/eh_recoverfp.ll
Normal file
11
test/CodeGen/AArch64/eh_recoverfp.ll
Normal file
@ -0,0 +1,11 @@
|
||||
; RUN: llc -mtriple arm64-windows %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
define i8* @foo(i8* %a) {
|
||||
; CHECK-LABEL: foo
|
||||
; CHECK-NOT: llvm.x86.seh.recoverfp
|
||||
%1 = call i8* @llvm.x86.seh.recoverfp(i8* bitcast (i32 ()* @f to i8*), i8* %a)
|
||||
ret i8* %1
|
||||
}
|
||||
|
||||
declare i8* @llvm.x86.seh.recoverfp(i8*, i8*)
|
||||
declare i32 @f()
|
Loading…
Reference in New Issue
Block a user