Hi Will,

On Thu, Oct 26, 2017 at 05:13:38PM -0500, Will Schmidt wrote:
>       * config/rs6000/rs6000.c: (rs6000_gimple_fold_builtin) Add support for
>         gimple folding of vec_madd() intrinsics.

The colon goes after the closing parenthesis, and continuation lines
should not have extra indent.  I.e. like:

        * config/rs6000/rs6000.c: (rs6000_gimple_fold_builtin) Add support for
        gimple folding of vec_madd() intrinsics.

>       * config/rs6000/altivec.md: Add define_expand fmav8hi4

        * config/rs6000/altivec.md (fmav8hi4): New define_expand.

> +(define_expand "fmav8hi4"
> +  [(use (match_operand:V8HI 0 "register_operand" ""))
> +   (use (match_operand:V8HI 1 "register_operand" ""))
> +   (use (match_operand:V8HI 2 "register_operand" ""))
> +   (use (match_operand:V8HI 3 "register_operand" ""))]
> +   "TARGET_ALTIVEC"
> +{
> +  emit_insn (gen_altivec_vmladduhm (operands[0], operands[1],
> +                                 operands[2], operands[3]));
> +  DONE;
> +})

Just leave out the default, empty constraint strings please.

Maybe the altivec_vmladduhm pattern should just be renamed?  Or this
expander moved to there, at least.

> +    /* vec_madd (Float) */

The "Float" part here is misleading now.

> +    case ALTIVEC_BUILTIN_VMADDFP:
> +    case VSX_BUILTIN_XVMADDDP:
> +    case ALTIVEC_BUILTIN_VMLADDUHM:
> +      {
> +       arg0 = gimple_call_arg (stmt, 0);
> +       arg1 = gimple_call_arg (stmt, 1);
> +       tree arg2 = gimple_call_arg (stmt, 2);
> +       lhs = gimple_call_lhs (stmt);
> +       gimple *g = gimple_build_assign (lhs, FMA_EXPR , arg0, arg1, arg2);
> +       gimple_set_location (g, gimple_location (stmt));
> +       gsi_replace (gsi, g, true);
> +       return true;
> +      }

Okay for trunk with that fixed.  Thanks!


Segher

Reply via email to