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: GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test



  In message <13956.46052.667366.129757@ongaonga.elec.canterbury.ac.nz>you writ
  > I realise you can't do this for named patterns but this is easily
  > overcome using named expanders (with exceptions for movMN and addP
  > patterns required by reload).
Yup.  You have to be pretty careful, particularly with the move & add
patterns.

  > What valuable combination opportunities are missed if you write the
  > extra condition to only accept the valid operand combinations?
First problem is we'll have a pseudo which is set multiple times and may
die more than once.  This inhibits instruction combination.

Even if those problems are fixed, consider:

(set (reg1) (mem (blah))
(set (reg2) (mem (oof))
(set (reg1) (minus (reg1) (reg2)
(set (mem (blah)) (reg1))


We would like to be able to convert that into:


(set (reg2) (mem (oof))
(set (mem (blah)) (minus (mem (blah)) (reg2)

Which reduces register pressure (and we'd like a post-reload splitter to
break it up into the original sequence if a free reg of the proper class can
be found).

However, to get to the desired code takes 2 combinations.  ie

step1

(set (reg2) (mem (oof))
(set (reg1) (minus (mem (blah)) (reg2)
(set (mem (blah)) (reg1))

step2:

(set (reg2) (mem (oof))
(set (mem (blah)) (minus (mem (blah)) (reg2)

But we can not perform step1 if we are rejecting cases where the source and
destination do not match.

jeff






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