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: Try harder to preserve operand ties in maybe_legitimize_operands


On 05/23/2018 12:47 AM, Richard Sandiford wrote:
> maybe_legitimize_operands normally goes through each operand in turn
> and legitimises it in isolation.  For example, if two operands to
> an instruction initially have constant value C, and the instruction
> requires both operands to be registers, the function ends up forcing
> C into a register twice and passing two different registers to the
> instruction.
> 
> I think we should try a bit harder to preserve the rtx_equal_p
> property, if it's easy to do.  Some targets can optimise that
> case better than they would the general case of all operands
> being different.  This is particularly true for SVE after the
> upcoming changes to the IFN_COND_* routines.
> 
> This is hard to test on its own, but is covered by the upcoming
> IFN_COND_* patches.
> 
> Tested on aarch64-linux-gnu (with and without SLP, and with and without
> the follow-on patch that needs it), aarch64_be-elf and x86_64-linux-gnu.
> OK to install?
> 
> Richard
> 
> 
> 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
> 
> gcc/
> 	* optabs.c (can_reuse_operands_p): New function.
> 	(maybe_legitimize_operands): Try to reuse the results for
> 	earlier operands.
OK.
jeff


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