Open
Description
This common NIR sequence:
vec1 32 ssa_3 = fge ssa_1, ssa_2
vec1 32 ssa_4 = b2f ssa_3
generates:
# fge
fsub.sf null, t0, u2 (0x41f00000 / 30.000000)
mov t13, 0
mov.ns t13, -1
# b2f
and t15, t13, 1.000000
This is silly -- we could have just done:
fsub.sf null, t0, u2 (0x41f00000 / 30.000000)
mov t15, 0
mov.ns t15, 1.0000000
We have some logic for doing this kind of trick in ntq_emit_comparison()
that could extend to b2f, but if
statements, discard_if
intrinsics, and probably others could use similar treatment.