Index: lib/CodeGen/CGBuiltin.cpp =================================================================== --- lib/CodeGen/CGBuiltin.cpp +++ lib/CodeGen/CGBuiltin.cpp @@ -4647,11 +4647,6 @@ return Builder.CreateCall(F); } - if (BuiltinID == AArch64::BI__builtin_thread_pointer) { - Function *F = CGM.getIntrinsic(Intrinsic::aarch64_thread_pointer); - return Builder.CreateCall(F); - } - // CRC32 Intrinsic::ID CRCIntrinsicID = Intrinsic::not_intrinsic; switch (BuiltinID) { Index: test/CodeGen/builtins-arm64.c =================================================================== --- test/CodeGen/builtins-arm64.c +++ test/CodeGen/builtins-arm64.c @@ -7,7 +7,7 @@ void *tp (void) { return __builtin_thread_pointer (); -// CHECK: call {{.*}} @llvm.aarch64.thread.pointer() +// CHECK: call {{.*}} @llvm.thread.pointer() } // CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a)