Not sure this is the right place for it next to the table.
Diff Detail
Event Timeline
Just in case, am I correct that the compiler engages output modifiers only when "denormal-fp-math"="positive-zero"? AFAIU this is necessary because output modifiers force -0 to +0.
We have preserve-sign behavior and ignore positive-zero mode entirely. Also the modifiers are silently ignored for ieee mode =0. I don't remember what the wrong behavior depending on the denormal mode was, beyond don't use these without flushing
I see. What I would like to emphasize is that the compiler should NOT use output modifiers for optimization when "denormal-fp-math"="preserve-sign" (in spite of modifiers will work in this mode), because output modifiers break sign preservation behavior. The compiler should use output modifiers only in "denormal-fp-math"="positive-zero" mode.
The whole point of this change is to document that the hardware has preserve sign denormal behavior and we do not support positive-zero mode. We only apply output modifiers with nsz and don't consider the denormal mode
Seems like an obvious incremental improvement to mention this, irrespective of any nits in the wording.
llvm/docs/AMDGPUUsage.rst | ||
---|---|---|
4596 | If we can't implement flushing-to-positive-zero then surely we should treat "denormal-fp-math"="positive-zero" the same as "denormal-fp-math"="ieee", since according to LangRef "it is not mandated that flushing to zero occurs" at all. So I don't see where undefined behaviour comes into it. |
llvm/docs/AMDGPUUsage.rst | ||
---|---|---|
4596 | It's informative of the mode, and we can be a bit lax on the outputs. However, for the input treatment, this acts more like a constraint (e.g. you can't introduce a divide by 0 for a denormal input) |
If we can't implement flushing-to-positive-zero then surely we should treat "denormal-fp-math"="positive-zero" the same as "denormal-fp-math"="ieee", since according to LangRef "it is not mandated that flushing to zero occurs" at all. So I don't see where undefined behaviour comes into it.