When hoisting/moving calls to locations, we strip unknown metadata. Such calls are usually marked speculatable, i.e. they are guaranteed to not cause undefined behaviour when run anywhere. So, we should strip attributes that can cause immediate undefined behaviour if those attributes are not valid in the context where the call is moved to.
Fix for PR50744.
dropUnknownNonDebugMetadata()'s documentation really needs an update
to point out that dropUndefImplyingAttrsAndUnknownMetadata() likely should be used instead.