1829d74ad3
inf or nan subtracted by itself is not zero. I don't think Vulkan requires this, but this better matches NIR's constant folding and the divergent implementation. fossil-db (navi31): Totals from 3 (0.00% of 79395) affected shaders: Instrs: 537 -> 588 (+9.50%) CodeSize: 3132 -> 3380 (+7.92%) Latency: 2806 -> 2819 (+0.46%) InvThroughput: 286 -> 316 (+10.49%) Copies: 24 -> 39 (+62.50%) VALU: 262 -> 289 (+10.31%) SALU: 33 -> 51 (+54.55%) Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29418>