On Mon, Mar 21, 2016 at 02:43:23PM -0600, Jeff Law wrote: > On 03/21/2016 02:21 PM, Jakub Jelinek wrote: > >Hi! > > > >HONOR_NANS when called on a tree or its type handles properly > >vector/complex element modes, but HONOR_NANS (TYPE_MODE (TREE_TYPE (...))) > >does not. > > > >Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > >trunk? > > > >2016-03-21 Marc Glisse <marc.gli...@inria.fr> > > Jakub Jelinek <ja...@redhat.com> > > > > PR tree-optimization/70317 > > * match.pd (cmp @0 @0): Pass @0 instead of TYPE_MODE (TREE_TYPE (@0)) > > to HONOR_NANS. > > > > * gcc.dg/pr70317.c: New test. > Presumably this is the need to look at the mode of the inner type for > vectors, right?
HONOR_NANS (tree t) is HONOR_NANS (element_mode (t)), where element_mode is if (!TYPE_P (t)) t = TREE_TYPE (t); if (VECTOR_TYPE_P (t) || TREE_CODE (t) == COMPLEX_TYPE) t = TREE_TYPE (t); return TYPE_MODE (t); Jakub