Change:
I guess intrinsics need to be ed and not d? Maybe the MIR inliner is inlining the intrinsic's wrapper, but keeps the target intact when it shouldn't. Or this should be handled in codegen, not sure.
The implementation ends up calling pause intrinsic declared as follows: The rustc codegen is completely unaware that it is dealing with an intrinsic, it just changes the symbol name. Looks like the whole feature was introduced by accident, and feature gate was introduced after the fact to make it unstable.

Discussion:
destination: Option<(ReturnDest<'tcx, Bx::Value>, mir::BasicBlock)>, cleanup: Option<mir::BasicBlock>, ) { <del> if let Some(cleanup) = cleanup { </del> <ins> // If there is a cleanup block and the function we're calling can unwind, then // do an invoke, otherwise do a call. if let Some(cleanup) = cleanup.filter(|_| fn_abi.can_unwind) { </ins> let ret_bx = if let Some((_, target)) = destination { fx.blocks[target] } else {

#[unwind(aborts)] // FIXME(#58794) pub unsafe extern "C" fn use_foreign_c_variadic_0() { // Ensure that we correctly call foreign C-variadic functions. <del> // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0) </del> <ins> // CHECK: call void (i32, ...) @foreign_c_variadic_0([[PARAM:i32( signext)?]] 0) </ins> foreign_c_variadic_0(0); <del> // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42) </del> <ins> // CHECK: call void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42) </ins> foreign_c_variadic_0(0, 42i32); <del> // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024) </del> <ins> // CHECK: call void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024) </ins> foreign_c_variadic_0(0, 42i32, 1024i32); <del> // CHECK: invoke void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0) </del> <ins> // CHECK: call void (i32, ...) @foreign_c_variadic_0([[PARAM]] 0, [[PARAM]] 42, [[PARAM]] 1024, [[PARAM]] 0) </ins> foreign_c_variadic_0(0, 42i32, 1024i32, 0i32); }

// removing the "spoofed" `VaListImpl` that is used by Rust defined C-variadics. #[unwind(aborts)] // FIXME(#58794) pub unsafe extern "C" fn use_foreign_c_variadic_1_0(ap: VaList) { <del> // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap) </del> <ins> // CHECK: call void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap) </ins> foreign_c_variadic_1(ap); } #[unwind(aborts)] // FIXME(#58794) pub unsafe extern "C" fn use_foreign_c_variadic_1_1(ap: VaList) { <del> // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42) </del> <ins> // CHECK: call void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 42) </ins> foreign_c_variadic_1(ap, 42i32); } #[unwind(aborts)] // FIXME(#58794) pub unsafe extern "C" fn use_foreign_c_variadic_1_2(ap: VaList) { <del> // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42) </del> <ins> // CHECK: call void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42) </ins> foreign_c_variadic_1(ap, 2i32, 42i32); } #[unwind(aborts)] // FIXME(#58794) pub unsafe extern "C" fn use_foreign_c_variadic_1_3(ap: VaList) { <del> // CHECK: invoke void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0) </del> <ins> // CHECK: call void ({{.*}}*, ...) @foreign_c_variadic_1({{.*}} %ap, [[PARAM]] 2, [[PARAM]] 42, [[PARAM]] 0) </ins> foreign_c_variadic_1(ap, 2i32, 42i32, 0i32); }

<ins> // compile-flags: -C no-prepopulate-passes #![feature(link_llvm_intrinsics)] #![crate_type = "lib"] struct A; impl Drop for A { fn drop(&mut self) { println!("A"); } } extern { #[link_name = "llvm.sqrt.f32"] fn sqrt(x: f32) -> f32; } pub fn do_call() { let _a = A; unsafe { // Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them // CHECK: call float @llvm.sqrt.f32(float 4.000000e+00 sqrt(4.0); } } </ins>