On Mon, Oct 8, 2012 at 6:08 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
>> +(define_insn "*sse3_haddv2df3" >> [(set (match_operand:V2DF 0 "register_operand" "=x,x") >> (vec_concat:V2DF >> - (plusminus:DF >> + (plus:DF >> + (vec_select:DF >> + (match_operand:V2DF 1 "register_operand" "0,x") >> + (parallel [(match_operand:SI 3 "const_0_to_1_operand")])) >> + (vec_select:DF >> + (match_dup 1) >> + (parallel [(match_operand:SI 4 "const_0_to_1_operand")]))) >> + (plus:DF >> + (vec_select:DF >> + (match_operand:V2DF 2 "nonimmediate_operand" "xm,xm") >> + (parallel [(match_operand:SI 5 "const_0_to_1_operand")])) >> + (vec_select:DF >> + (match_dup 2) >> + (parallel [(match_operand:SI 6 "const_0_to_1_operand")])))))] >> + "TARGET_SSE3 && INTVAL (operands[3]) != INTVAL (operands[4]) >> + && INTVAL (operands[5]) != INTVAL (operands[6])" >> + "@ >> + haddpd\t{%2, %0|%0, %2} >> + vhaddpd\t{%2, %1, %0|%0, %1, %2}" >> + [(set_attr "isa" "noavx,avx") >> + (set_attr "type" "sseadd") >> + (set_attr "prefix" "orig,vex") >> + (set_attr "mode" "V2DF")]) > > Please use (match_dup 3) in place of (match_operand 5) and (match_dup > 4) in place of (match_operand 6) predicates. These should be the same. Oh, I was too quick with this part. The code above is OK, since we can permute every part independently. Uros.