This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Tweak tree-ssa/pr81588.c testcase (PR tree-optimization/81655)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 12:22:26 +0200
- Subject: Re: [PATCH] Tweak tree-ssa/pr81588.c testcase (PR tree-optimization/81655)
- Authentication-results: sourceware.org; auth=none
- References: <20170802101125.GJ2123@tucnak>
On Wed, Aug 2, 2017 at 12:11 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> I have an improvement that handles tree-ssa/pr81588.c optimization
> even on branch cost 1, but as it is effectively an extension to the
> range var_bound optimization, I'm not sure it should be backported.
>
> Therefore, this patch treats this testcase similarly to other
> testcases that rely on branch cost of 2 (so that there is BIT_IOR_EXPR
> and not 2 separate jumps).
>
> Tested on x86_64-linux, ok for 7.2?
Ok.
Richard.
> 2017-08-02 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/81655
> PR tree-optimization/81588
> * gcc.dg/tree-ssa/pr81588.c: Use -mbranch-cost=2 where possible,
> don't run the test on branch-cost=1 targets.
>
> --- gcc/testsuite/gcc.dg/tree-ssa/pr81588.c.jj 2017-08-01 10:28:50.000000000 +0200
> +++ gcc/testsuite/gcc.dg/tree-ssa/pr81588.c 2017-08-02 11:02:30.966184545 +0200
> @@ -1,7 +1,8 @@
> /* PR tree-optimization/81588 */
> -/* { dg-do compile } */
> +/* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* bfin*-*-* v850*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*" } } } */
> /* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
> -
> +/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
> +
> extern long long int a, c;
> extern unsigned short b;
>
>
> Jakub