[PATCH] D57614: [AutoUpgrade] Fix AutoUpgrade for x86.eh.recoverfp

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 1 12:38:39 PST 2019


mgrang created this revision.
mgrang added a reviewer: efriedma.
Herald added a project: LLVM.

This fixes the bug in https://reviews.llvm.org/D56747#inline-502711.


Repository:
  rL LLVM

https://reviews.llvm.org/D57614

Files:
  lib/IR/AutoUpgrade.cpp


Index: lib/IR/AutoUpgrade.cpp
===================================================================
--- lib/IR/AutoUpgrade.cpp
+++ lib/IR/AutoUpgrade.cpp
@@ -471,6 +471,11 @@
     }
   }
 
+  if (Name == "seh.recoverfp") {
+    NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::eh_recoverfp);
+    return true;
+  }
+
   return false;
 }
 
@@ -546,10 +551,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;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57614.184817.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190201/fab1bb88/attachment.bin>


More information about the llvm-commits mailing list