I realized the handling of copysign made no sense at all. Only the type of the first operand should really matter, and it should not perform a conversion between them. Also fixes misleading errors and producing broken IR for integers. We could accept different FP types for the sign argument, if the intrinsic permitted different types like the DAG node. As it is we would need to insert a cast, which could have other effects (like trapping on snan) which should not happen for a copysign.
23 KiB
23 KiB