[PATCH] D57614: [AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfp
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 17:32:52 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL352945: [AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfp (authored by mgrang, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57614?vs=184832&id=184876#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57614/new/
https://reviews.llvm.org/D57614
Files:
llvm/trunk/lib/IR/AutoUpgrade.cpp
llvm/trunk/test/CodeGen/AArch64/eh_recoverfp.ll
Index: llvm/trunk/lib/IR/AutoUpgrade.cpp
===================================================================
--- llvm/trunk/lib/IR/AutoUpgrade.cpp
+++ llvm/trunk/lib/IR/AutoUpgrade.cpp
@@ -482,6 +482,11 @@
}
}
+ if (Name == "seh.recoverfp") {
+ NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::eh_recoverfp);
+ return true;
+ }
+
return false;
}
@@ -557,10 +562,6 @@
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;
}
Index: llvm/trunk/test/CodeGen/AArch64/eh_recoverfp.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/eh_recoverfp.ll
+++ llvm/trunk/test/CodeGen/AArch64/eh_recoverfp.ll
@@ -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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57614.184876.patch
Type: text/x-patch
Size: 1243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190202/65020c68/attachment.bin>
More information about the llvm-commits
mailing list