When X = 0 and Y = inf, the original code produces inf, but the transformed
code produces nan. So this transform (and its relatives) should only be
used when the no-infs-fp-math flag is explicitly enabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98578