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. 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. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797