When an intrinsic is remangled, we currently try to replace with the canonical declaration. Unfortunately there is a quirk that makes intrinsic declarations in LLVM non-unique: For intrinsics with struct return type, the canonical declaration returns an unnamed struct, but LLVM also accepts named structs of equivalent structure. This "feature" is in active use by some target intrinsics.
As such, when we remangle an intrinsic we should use the original function type and just assign the new remangled name. matchIntrinsicSignature() has already checked that the function signature is valid.
This is not directly related to opaque pointers, but opaque pointer autoupgrade needs to remangle all intrinsics involving pointers, which is why we're hitting this issue now.