[PATCH 1/2] [Middle-end] Simplify (trunc)copysign((extend)a, (extend)b) to .COPYSIGN (a, b).
Thu Nov 4 18:32:51 GMT 2021
On Thu, 4 Nov 2021, liuhongt via Gcc-patches wrote:
> a and b are same type as the truncation type and has less precision
> than extend type.
Note that this is not safe with -fsignaling-nans, so needs to be disabled
for that option (if there isn't already logic somewhere with that effect),
because the extend will convert a signaling NaN to quiet (raising
"invalid"), but copysign won't, so this transformation could result in a
signaling NaN being wrongly returned when the original code would never
have returned a signaling NaN.
Joseph S. Myers
More information about the Gcc-patches