Hi Mike, Okay for trunk. Comment below...
On Fri, Aug 19, 2016 at 07:59:39PM -0400, Michael Meissner wrote: > * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support > for using VSPLTH/VSPLTB to initialize vector short and vector char > vectors with all of the same element. > > * config/rs6000/vsx.md (VSX_SPLAT_I): New mode iterators and > attributes to initialize V8HImode and V16QImode vectors with the > same element. > (VSX_SPLAT_COUNT): Likewise. > (VSX_SPLAT_SUFFIX): Likewise. > (vsx_vsplt<VSX_SPLAT_SUFFIX>_di): New insns to support > initializing V8HImode and V16QImode vectors with the same > element. > + /* Special case initializing vector short/char that are splats if we are on > + 64-bit systems with direct move. */ > + if (all_same && TARGET_DIRECT_MOVE_64BIT > + && (mode == V16QImode || mode == V8HImode)) > + { > + rtx op0 = XVECEXP (vals, 0, 0); > + rtx di_tmp = gen_reg_rtx (DImode); > + > + if (!REG_P (op0)) > + op0 = force_reg (GET_MODE_INNER (mode), op0); Always using force_reg is easier to read imo. Thanks, Segher