This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch][ARM] Add -mbranch-cost option, and update a few tests
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Jan 2018 15:44:06 +0100
- Subject: Re: [Patch][ARM] Add -mbranch-cost option, and update a few tests
- Authentication-results: sourceware.org; auth=none
- References: <CAKdteObgr2tnX4x1CneBwbyWmpr_FBT+ZpeUdNZQpbRTUvQ8vA@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 23, 2017 at 02:30:24PM +0200, Christophe Lyon wrote:
> After Jakub's suggestion in PR82120 and PR81184, the attached patch
> adds the -mbranch-cost option to the ARM target. My understanding
> is that it's intended to be used internally for testing and does not
> require user-facing documentation.
>
> I have updated a few tests, validation on aarch64 & arm targets shows
> no regression,
> and a few improvements when targeting cortex-a5 or cortex-m3:
> gcc.dg/tree-ssa/reassoc-3[3456].c now pass.
>
> That being said, I'm not sure about the other targets for which I
> changed the condition,
> and I am also concerned by the fact that it has no impact on
> gcc.dg/pr21643.c and gcc.dg/tree-ssa/phi-opt-11.c (PR81184).
>
> Should I restrict my patch to the only tests where it has an impact
> (gcc.dg/tree-ssa/reassoc-3[3456].c) ?
Let's change all and watch the effects on all targets in testresults,
we can fine tune later on.
Does pr21643.c really fail somewhere on arm*? Tried -mcpu=cortex-a5
and don't see the failure in x86_64-linux -> armv7a-hardfloat-linux-gnueabi
cross.
> gcc/ChangeLog:
>
> 2017-10-23 Christophe Lyon <christophe.lyon@linaro.org>
>
> * config/arm/arm.opt (-mbranch-cost): New option.
> * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
> account.
>
> gcc/testsuite/ChangeLog:
>
> 2017-10-23 Christophe Lyon <christophe.lyon@linaro.org>
>
> * lib/target-supports.exp (check_effective_target_branch_cost):
> New function.
> * gcc.dg/builtin-bswap-7.c: Use branch_cost effective target.
> * gcc.dg/pr21643.c: Likewise.
> * gcc.dg/pr46309.c: Likewise.
> * gcc.dg/tree-ssa/phi-opt-11.c: Likewise.
> * gcc.dg/tree-ssa/phi-opt-2.c: Likewise.
> * gcc.dg/tree-ssa/reassoc-32.c: Likewise.
> * gcc.dg/tree-ssa/reassoc-33.c: Likewise.
> * gcc.dg/tree-ssa/reassoc-34.c: Likewise.
> * gcc.dg/tree-ssa/reassoc-35.c: Likewise.
> * gcc.dg/tree-ssa/reassoc-36.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-13.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise.
> * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise.
Ok for trunk.
Note, unreviewed patches should be pinged from time to time.
Jakub