This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Simplify ashl<mode>3 expander for SHORT modes
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, <nd at arm dot com>
- Date: Fri, 27 May 2016 10:41:45 +0100
- Subject: Re: [PATCH][AArch64] Simplify ashl<mode>3 expander for SHORT modes
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- References: <5720C867 dot 3060708 at foss dot arm dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
On Wed, Apr 27, 2016 at 03:10:47PM +0100, Kyrill Tkachov wrote:
> Hi all,
>
> The ashl<mode>3 expander for QI and HI modes is needlessly obfuscated.
> The 2nd operand predicate accepts nonmemory_operand but the expand code
> FAILs if it's not a CONST_INT. We can just demand a const_int_operand in
> the predicate and remove the extra CONST_INT check.
>
> Looking at git blame, it seems it was written that way as a result of some
> other refactoring a few years back for an unrelated change.
>
> Bootstrapped and tested on aarch64-none-linux-gnu.
> Ok for trunk?
This is OK.
Thanks for the cleanup,
James
> 2016-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/aarch64/aarch64.md (ashl<mode>3, SHORT modes):
> Use const_int_operand for operand 2 predicate. Simplify expand code
> as a result.