Hi Mike,

On Tue, Dec 13, 2016 at 01:16:56PM -0500, Michael Meissner wrote:
> I have done bootstrap builds on a 64-bit power8 little endian system and a
> 32/64-bit power7 big endian system.  There were no regressions.  Can I check
> this into the GCC trunk?

Yes, please apply.  One remark below.

> 2016-12-13   Michael Meissner  <meiss...@linux.vnet.ibm.com>
> 
>       * config/rs6000/predicates.md (const_0_to_11_operand): New
>       predicate, match 0..11.
>       * config/rs6000/rs6000-builtin.def (BU_P9V_VSX_3): Set built-in
>       type to ternary, not binary.
>       (BU_P9V_64BIT_VSX_3): Likewise.
>       (P9V_BUILTIN_VEXTRACT4B): Add support for vec_vinsert4b and
>       vec_extract4b non-overloaded built-in functions.
>       (P9V_BUILTIN_VINSERT4B): Likewise.
>       (P9V_BUILTIN_VINSERT4B_DI): Likewise.
>       (P9V_BUILTIN_VEC_VEXTULX): Move to section that adds 2 operand ISA
>       3.0 built-in functions.
>       (P9V_BUILTIN_VEC_VEXTURX): Likewise.
>       (P9V_BUILTIN_VEC_VEXTRACT4B): Add support for overloaded
>       vec_insert4b and vec_extract4 built-in functions.
>       (P9V_BUILTIN_VEC_VINSERT4B): Likewise.
>       * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
>       overloaded support for vec_vinsert4b and vec_extract4b.
>       * config/rs6000/rs6000.c (altivec_expand_builtin): Add checks for
>       the vec_insert4b and vec_extract4b byte number being a constant in
>       the range 0..11.
>       * config/rs6000/vsx.md (UNSPEC_XXEXTRACTUW): New unspec.
>       (UNSPEC_XXINSERTW): Likewise.
>       (vextract4b): Add support for the vec_vextract4b built-in
>       function.
>       (vextract4b_internal): Likewise.
>       (vinsert4b): Add support for the vec_insert4b built-in function.
>       Include both a version that inserts element 1 from a V4SI object
>       and one that inserts a DI object.
>       (vinsert4b_internal): Likewise.
>       (vinsert4b_di): Likewise.
>       (vinsert4b_di_internal): Likewise.
>       * config/rs6000/altivec.h (vec_vinsert4b): Support vec_vinsert4b
>       and vec_extract4b built-in functions.
>       * doc/extend.doc (PowerPC VSX built-in functions): Document
>       vec_insert4b and vec_extract4b.
> 
> [gcc/testsuite]
> 2016-12-13  Michael Meissner  <meiss...@linux.vnet.ibm.com>
> 
>       * gcc.target/powerpc/p9-vinsert4b-1.c: New test.
>       * gcc.target/powerpc/p9-vinsert4b-2.c: Likewise.

> @@ -15766,6 +15766,40 @@ altivec_expand_builtin (tree exp, rtx ta
>      case VSX_BUILTIN_VEC_EXT_V1TI:
>        return altivec_expand_vec_ext_builtin (exp, target);
>  
> +    case P9V_BUILTIN_VEXTRACT4B:
> +    case P9V_BUILTIN_VEC_VEXTRACT4B:
> +      arg1 = CALL_EXPR_ARG (exp, 1);
> +      STRIP_NOPS (arg1);
> +
> +      /* Generate a normal call if it is invalid.  */
> +      /* If we got invalid arguments bail out before generating bad rtl.  */

If what is invalid?  Just remove the first comment?

Thanks,


Segher

Reply via email to