This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Removing redundant slls from 64-bit MIPS code


Richard Henderson <rth@redhat.com> writes:
> On Fri, May 28, 2004 at 08:27:20AM +0100, Richard Sandiford wrote:
>> ! (define_insn_and_split "extendsidi2"
>>     [(set (match_operand:DI 0 "register_operand" "=d,d")
>> !         (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "0,m")))]
>
> Is there much difference if you do
>
> 	"=d,?d,?d"
> 	" 0, d, m

Doesn't look like it.  I just ran:

(define_insn_and_split "extendsidi2"
  [(set (match_operand:DI 0 "register_operand" "=d,?d,?d")
        (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "0,d,m")))]
  "TARGET_64BIT"
  "@
   #
   move\t%0,%1
   lw\t%0,%1"
  "&& reload_completed
   && GET_CODE (operands[0]) == REG
   && GET_CODE (operands[1]) == REG
   && REGNO (operands[0]) == REGNO (operands[1])"
  [(const_int 0)]
{
  emit_note (NOTE_INSN_DELETED);
  DONE;
}
  [(set_attr "type" "arith,arith,load")
   (set_attr "mode" "DI")])

through the same code-comparison test, using the applied patch as
a baseline.  Results were:

 24 files changed, 78 insertions(+), 63 deletions(-)

The only file to get shorter was the one that got longer last time.
All the rest were the same or longer (due to extra "move" insns).

Richard


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