[llvm] 405faef - PreISelIntrinsicLowering: Identify load.relative with intrinsic id

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 05:26:39 PDT 2023


Author: Matt Arsenault
Date: 2023-06-07T08:26:31-04:00
New Revision: 405faef2cdff118cf899d974f0370ac419d94166

URL: https://github.com/llvm/llvm-project/commit/405faef2cdff118cf899d974f0370ac419d94166
DIFF: https://github.com/llvm/llvm-project/commit/405faef2cdff118cf899d974f0370ac419d94166.diff

LOG: PreISelIntrinsicLowering: Identify load.relative with intrinsic id

Added: 
    

Modified: 
    llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
index 87e2f9f200211..228557b7a74ca 100644
--- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
@@ -136,13 +136,12 @@ static bool lowerObjCCall(Function &F, const char *NewFn,
 static bool lowerIntrinsics(Module &M) {
   bool Changed = false;
   for (Function &F : M) {
-    if (F.getName().startswith("llvm.load.relative.")) {
-      Changed |= lowerLoadRelative(F);
-      continue;
-    }
     switch (F.getIntrinsicID()) {
     default:
       break;
+    case Intrinsic::load_relative:
+      Changed |= lowerLoadRelative(F);
+      break;
     case Intrinsic::objc_autorelease:
       Changed |= lowerObjCCall(F, "objc_autorelease");
       break;


        


More information about the llvm-commits mailing list