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: [4.5] Better support for widening multiplies


Bernd Schmidt wrote:

> The Blackfin profits a lot from being able to use widening 16x16->32 bit
> multiplications rather than extending the operands and using a full 32
> bit multiplication.

> This adds another small pass that uses UD chains to find the defs
> corresponding to the operands of a multiply, and if they all use the
> same kind of extension, modify the multiply insn to perform a widening
> multiply.  It recognizes not only ZERO_EXTEND and SIGN_EXTEND, but also
> right shifts (logical and arithmetic) by half the mode size.

  Is this a win for all backends, and if not, would it be possible to
condition the pass on whether or not the backend implements suitable insns to
be able to take advantage of the opportunities for optimisation that this pass
offers?  (I'm just thinking about the gradual accumulation of passes and
compile-time regression here, not objecting in principle).

    cheers,
      DaveK


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