This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/4][AArch64] Cost CCMP instruction sequences to choose better expand order
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Christophe Lyon <christophe dot lyon at linaro dot org>, nd <nd at arm dot com>
- Date: Thu, 28 Jan 2016 14:33:20 +0000
- Subject: Re: [PATCH 4/4][AArch64] Cost CCMP instruction sequences to choose better expand order
- Authentication-results: sourceware.org; auth=none
- References: <000301d11e2c$ca46b1c0$5ed41540$ at arm dot com> <m237tomvdu dot fsf at linux-m68k dot org> <AM3PR08MB0088F7FED788CA7D0090F21683C70 at AM3PR08MB0088 dot eurprd08 dot prod dot outlook dot com>
On Mon, Jan 25, 2016 at 08:09:39PM +0000, Wilco Dijkstra wrote:
> Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> > FAIL: gcc.target/aarch64/ccmp_1.c scan-assembler-times \tcmp\tw[0-9]+, 0 4
> > FAIL: gcc.target/aarch64/ccmp_1.c scan-assembler adds\t
> > FAIL: gcc.target/aarch64/ccmp_1.c scan-assembler-times fccmpe\t.*0\\.0 1
>
> Yes I noticed those too, and here is the fix. Richard's recent change added
> UNSPEC to the CCMP patterns to stop combine optimizing the CCMP CCmode
> immediate in a rare case. This requires a change to the CCMP cost calculation
> as the CCMP instruction with unspec is no longer recognized.
>
> Fix the ccmp_1.c test to allow both '0' and 'wzr' on cmp - BTW is there a
> regular expression that correctly implements (0|xzr)? If I use that the test
> still fails somehow but \[0wzr\]+ works fine... Is the correct syntax
> documented somewhere?
>
> Finally to ensure FCCMPE is emitted on relational compares, add
> -ffinite-math-only.
OK.
Thanks,
James
>
> ChangeLog:
> 2016-01-25 Wilco Dijkstra <wdijkstr@arm.com>
>
> gcc/
> * config/aarch64/aarch64.c (aarch64_if_then_else_costs):
> Remove CONST_INT_P check in CCMP cost calculation.
>
> gcc/testsuite/
> * gcc.target/aarch64/ccmp_1.c: Fix test issues.
>