On Tue, Nov 24, 2020 at 05:31:03PM -0700, Jeff Law wrote: > FIrst, do we need to document the new builtin?Â
I think for builtins that are only meant for libstdc++ as underlying implementation of its documented in the standard APIs we have some cases where we don't document them and other cases where we don't. I can certainly add doc/extend.texi documentation for it. > > --- gcc/fold-const.c.jj 2020-10-15 15:09:49.079725120 +0200 > > +++ gcc/fold-const.c 2020-11-02 17:20:43.784633491 +0100 > > @@ -7998,6 +8083,8 @@ native_encode_initializer (tree init, un > > if (ptr) > > memcpy (ptr + (curpos - o), ptr + (pos - o), > > fieldsize); > > + if (mask) > > + memcpy (mask + curpos, mask + pos, fieldsize); > > } > > else if (!native_encode_initializer (val, > > ptr > Presumably we've already determined that the memcpy won't have an > overlap between the source and destination here? Yes, similar reason why the memcpy above that doesn't overlap. This is when we want to save work, and compute the value bits and mask bits for one element and then just copy it over to all following elements that are initialized with the same value when the index is a RANGE_EXPR. Jakub