CGP tail-duplicates rets into blocks that end with a call that feed the ret. This puts the call in tail position, potentially allowing the DAG builder to lower it as a tail call. To avoid the tail-duplication in cases where we won't form the tail call, CGP tries to predict whether this is going to be possible, and avoid doing it when lowering as a tail call will definitely fail. However, it was being too conservative by always throwing away calls to functions with a signext/zeroext attribute on the return type.
Instead, we can use the exact same logic the builder itself uses to determine whether the attributes work out.
It's kind of awkward to pass this as an output parameter and not use it.
Would it be better to make it a pointer argument with a default value of nullptr?