diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md index 54b18aa..18a7f08 100644 --- a/gcc/config/rs6000/vector.md +++ b/gcc/config/rs6000/vector.md @@ -1078,21 +1078,15 @@ ;; Vector reduction expanders for VSX (define_expand "reduc__scal_v2df" - [(parallel [(set (match_operand:DF 0 "vfloat_operand" "") - (vec_select:DF - (VEC_reduc:V2DF - (vec_concat:V2DF - (vec_select:DF - (match_operand:V2DF 1 "vfloat_operand" "") - (parallel [(const_int 1)])) - (vec_select:DF - (match_dup 1) - (parallel [(const_int 0)]))) - (match_dup 1)) - (parallel [(const_int 1)]))) - (clobber (match_scratch:DF 2 ""))])] + [(match_operand:DF 0 "register_operand" "") + (VEC_reduc:V2DF (match_operand:V2DF 1 "vfloat_operand" "") (const_int 0))] "VECTOR_UNIT_VSX_P (V2DFmode)" - "") + { + rtx vec = gen_reg_rtx (V2DFmode); + emit_insn (gen_vsx_reduc__v2df (vec, operand1)); + emit_insn (gen_vsx_extract_v2df (operand0, vec, const1_rtx)); + DONE; + }) ; The (VEC_reduc:V4SF ; (op1) diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 7aa0f12..8df6a45 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -2150,7 +2150,7 @@ ;; Vector reduction insns and splitters -(define_insn_and_split "*vsx_reduc__v2df" +(define_insn_and_split "vsx_reduc__v2df" [(set (match_operand:V2DF 0 "vfloat_operand" "=&wd,&?wa,wd,?wa") (VEC_reduc:V2DF (vec_concat:V2DF