The most notable issue was producing v_mad_f32 in functions with the
dynamic mode, since it just ignores the mode. fdiv lowering is still
somewhat broken because it involves a mode switch and we need to query
the original mode.
Details
Diff Detail
Event Timeline
Can you please explain why does it need reversal of the HasFP32Denormals? This creates a lot turmoil.
It's conceptually backwards. The default logic has to be treat like IEEE. It needs to be the positive condition that we definitely have flushing on
It should be possible to logically separate it into 2 patches then: one reversing the flag but not changing the behavior, and then the fix itself?
Yes, but it's kind of the same thing. I'd have to go spend the time to re-invert all the logic here and doesn't seem worth the effort
Most of the patch is the logic inversion, I believe I have scanned it 3 times already. Could you please highlight the actual fix, or why does the inversion itself fixes it?
Because there's a 3rd option now, dynamic. It could be either mode. !IEEE doesn't imply denormals can be flushed, it has to be ==PreserveSign. This fixes illegally forming v_mad_f32 (see v_mac_f32_dynamic_ftz, this would be wrong if the function was called from an IEEE context if it used v_mad_f32)