This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reload problem


  In message <jevh7bqzjj.fsf@hawking.suse.de>you write:

  > |> (define_expand "divmodsi4"
  > |>   [(set (match_operand:SI 0 "general_operand" "")
  > |>         (div:SI (match_operand:SI 1 "general_operand" "")
  > |>                 (match_operand:SI 2 "general_src_operand" "")))
  > |>    (set (match_operand:SI 3 "general_operand" "")
  > |>         (mod:SI (match_dup 1) (match_dup 2)))]
  > |>   "TARGET_68020 && !TARGET_5200"
  > |>   "")
  > 
  > Thanks, that does help (after putting the required parallel around the
  > sequence).  What I still wonder is why this hasn't been yet triggered on
  > the other architectures that have pretty much the same patterns.
1. I don't see why you need expanders + patterns.  There's no reason why
   the expander can't serve both purposes.  If Joern thinks otherwise he
   should provide more details.

2. According to expand_twoval_binop the operands should be numbered:

   operand0 -- target 0
   operand1 -- input 0
   operand2 -- input 1
   operand3 -- target 1

   So I think the original ordering of operands was correct.

So basically, I don't see what was wrong with the original define_insn.


jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]