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;