This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][P1 tree-optimization/68541] Add heuristics to path splitting


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]