Toon Moene wrote: > H.J. Lu wrote: > >> If you can provide a testcase, I can take a look. If it isn't easy to >> find >> a testcase, please disable the second pattern: >> >> (define_peephole2 >> [(set (match_operand 0 "register_operand" "") >> (match_operand 1 "register_operand" "")) >> (set (match_dup 0) >> (match_operator 3 "commutative_operator" >> [(match_dup 0) >> (match_operand 2 "memory_operand" "")]))] >> "operands[0] != operands[1] >> && ((MMX_REG_P (operands[0]) && MMX_REG_P (operands[1])) >> || (SSE_REG_P (operands[0]) && SSE_REG_P (operands[1])))" >> [(set (match_dup 0) (match_dup 2)) >> (set (match_dup 0) >> (match_op_dup 3 [(match_dup 0) (match_dup 1)]))] >> "") >> >> to see if it makes a difference. > > Thanks. Test case is hard, but this is easy to try. Expect an answer > from me tomorrow (e.g. 12 UTC).
In case it does *not* make a difference, please try this patch: Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 144464) +++ config/i386/i386.md (working copy) @@ -20788,12 +20788,12 @@ ;; refers to the destination of the load! (define_peephole2 - [(set (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "register_operand" "")) + [(set (match_operand:P 0 "register_operand" "") + (match_operand:P 1 "register_operand" "")) (parallel [(set (match_dup 0) - (match_operator:SI 3 "commutative_operator" + (match_operator:P 3 "commutative_operator" [(match_dup 0) - (match_operand:SI 2 "memory_operand" "")])) + (match_operand:P 2 "memory_operand" "")])) (clobber (reg:CC FLAGS_REG))])] "operands[0] != operands[1] && GENERAL_REGNO_P (REGNO (operands[0])) Thanks, Paolo