[PATCH][GCC][AArch64] Limit movmem copies to TImode copies.

James Greenhalgh james.greenhalgh@arm.com
Wed Aug 29 16:49:00 GMT 2018


On Wed, Aug 15, 2018 at 07:55:18AM -0500, Tamar Christina wrote:
> Hi All,
> 
> I'm updating the patch with the suggested changes and also fixing a bug with a boundary condition.
> 
> On AArch64 we have integer modes larger than TImode, and while we can generate
> moves for these they're not as efficient.
> 
> So instead make sure we limit the maximum we can copy to TImode.  This means
> copying a 16 byte struct will issue 1 TImode copy, which will be done using a
> single STP as we expect but an CImode sized copy won't issue CImode operations.
> 
> I am also moving the residual code inside the if since smallest_mode_for_int may
> trap if the mode doesn't exist.  And the only time we know the mode to exist for
> sure is when the condition of the if is true.  This also saves repeated calls to
> the iterator.
> 
> Bootstrapped and regtested on aarch4-none-linux-gnu and no issues.
> Crosstested aarch4_be-none-elf and no issues.
> 
> Ok for trunk?

OK.

Thanks,
James

> gcc/
> 2018-08-15  Tamar Christina  <tamar.christina@arm.com>
> 
> 	* config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
> 
> gcc/testsuite/
> 2018-08-15  Tamar Christina  <tamar.christina@arm.com>
> 
>  	* gcc.target/aarch64/large_struct_copy_2.c: New.
> 



More information about the Gcc-patches mailing list