As long as aliasee has @llvm.used or @llvm.compiler.used references, we cannot do the related replace or delete operations. Even if it is a Local Linkage, we cannot infer if there is no other use for it, such as asm or other future added cases.
This fixes https://github.com/rust-lang/rust/issues/108030.
This is a minimal reproduction that works on macOS and Linux (x86_64).
The "OtherThanLLVMUsed" part here no longer makes sense?