On Mon, Nov 30, 2015 at 02:30:04PM +0000, Richard Sandiford wrote: > > keep the builtin_reciprocal hook (perhaps renamed to builtin_rsqrt) > > for the purpose of this condition and nothing else (i.e. return a > > boolean) and let the rest be determined from the optab, just commit > > the already posted patch, something else? > > ...I suppose the problem with adding extra conditions to the expander > is that it would break cases where the expander is used for target > built-ins too. > > Maybe optabs shouldn't be used for built-ins if the usage conditions > aren't the same. But if that's fighting too much against existing usage, > the hook "hack" could check these conditions too.
Yeah, I'm aware that the target builtins use those expanders with the current conditions and so would need to be renamed to something different if we take the approach of adding the conditions to all rsqrt* expanders. So, maybe it is best if I just apply my original patch right away so that the bug is fixed and we can continue discussions on how we want to handle it. Jakub