This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][P1 tree-optimization/68541] Add heuristics to path splitting
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 06 Feb 2016 11:19:58 +0100
- Subject: Re: [PATCH][P1 tree-optimization/68541] Add heuristics to path splitting
- Authentication-results: sourceware.org; auth=none
- References: <56B534F6 dot 6010201 at redhat dot com>
Jeff Law <law@redhat.com> writes:
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/split-path-2.c b/gcc/testsuite/gcc.dg/tree-ssa/split-path-2.c
> new file mode 100644
> index 0000000..aeb926e
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-2.c
> @@ -0,0 +1,21 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details " } */
> +
> +int
> +foo(char *p, int n)
> +{
> + int s = 0;
> + int i;
> +
> + for (i = 0; i < n; i++) {
> + if (p[i] >= 0)
> + s++;
> + else
> + s--;
> + }
> +
> + return s;
> +}
> +
> +/* { dg-final { scan-tree-dump "appears to be a join point for if-convertable diamond" "split-paths" } } */
That fails on aarch64.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."