On May 23, 2018 7:53:01 PM GMT+02:00, Michael Meissner <meiss...@linux.ibm.com> wrote: >On Wed, May 23, 2018 at 11:41:49AM +0200, Richard Biener wrote: >> Just a question for clarification - _is_ KFmode strictly a wider mode >> than IFmode? That is, can it represent all values that IFmode can? > >No. IFmode consists of a pair of doubles. I'm sure there are corner >cases >IFmode can represent something that KFmode can't. > >In addition, IFmode doesn't play to well with reseting rounding modes, >etc. > >> On another note I question the expanders considering wider FP modes >> somewhat in general. So maybe the hook shouldn't be named >> default_widening_p but rather mode_covers_p ()? And we can avoid >> calling the hook for integer modes. >> >> That said, I wonder if the construction of mode_wider and friends >> should be (optionally) made more explicit in the modes .def file >> so powerpc could avoid any wider relation for IFmode. > >This morning on the way to work, I was thinking that maybe the solution >is to >have an ALTERNATE_FLOAT_MODE, where it doesn't list the other float >modes of >the same size as canadates for widening. That way we could express it >the .def >file directly.
Yeah. Not sure if we need sth other than FLOAT_MODE or if avoiding the chaining in wider mode and friends is enough. I guess one could also change IFmode to be a non-scalar, composite mode - a different 'kind' of complex mode maybe... >One of the problems I've faced over the years is the assumption that >there is >only one type for a given size, and that isn't true for IF/KF/TFmode.