This patch prints a message to say how an alias check is being implemented.
2019-11-11 Richard Sandiford <richard.sandif...@arm.com> gcc/ * tree-data-ref.c (create_intersect_range_checks_index) (create_intersect_range_checks): Print dump messages. gcc/testsuite/ * gcc.dg/vect/vect-alias-check-1.c: Test for the type of alias check. * gcc.dg/vect/vect-alias-check-8.c: Likewise. * gcc.dg/vect/vect-alias-check-9.c: Likewise. * gcc.dg/vect/vect-alias-check-10.c: Likewise. * gcc.dg/vect/vect-alias-check-11.c: Likewise. * gcc.dg/vect/vect-alias-check-12.c: Likewise. * gcc.dg/vect/vect-alias-check-13.c: Likewise. * gcc.dg/vect/vect-alias-check-14.c: Likewise. * gcc.dg/vect/vect-alias-check-15.c: Likewise. * gcc.dg/vect/vect-alias-check-16.c: Likewise. * gcc.dg/vect/vect-alias-check-17.c: Likewise. Index: gcc/tree-data-ref.c =================================================================== --- gcc/tree-data-ref.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/tree-data-ref.c 2019-11-11 18:31:01.263118514 +0000 @@ -1890,6 +1890,8 @@ create_intersect_range_checks_index (cla else *cond_expr = part_cond_expr; } + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "using an index-based overlap test\n"); return true; } @@ -2037,6 +2039,8 @@ create_intersect_range_checks (class loo = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fold_build2 (cmp_code, boolean_type_node, seg_a_max, seg_b_min), fold_build2 (cmp_code, boolean_type_node, seg_b_max, seg_a_min)); + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "using an address-based overlap test\n"); } /* Create a conditional expression that represents the run-time checks for Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c 2019-03-08 18:15:02.304871094 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c 2019-11-11 18:31:01.247118627 +0000 @@ -15,3 +15,5 @@ fn1 () } /* { dg-final { scan-tree-dump "improved number of alias checks from \[0-9\]* to 1" "vect" } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c 2019-11-11 18:31:01.251118599 +0000 @@ -60,3 +60,5 @@ main (void) } /* { dg-final { scan-tree-dump {flags: *WAR\n} "vect" { target vect_int } } } */ +/* { dg-final { scan-tree-dump "using an index-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c 2019-11-11 18:31:01.251118599 +0000 @@ -53,3 +53,5 @@ main (void) } /* { dg-final { scan-tree-dump {flags: [^\n]*ARBITRARY\n} "vect" { target vect_int } } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c 2019-03-08 18:15:02.248871307 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c 2019-11-11 18:31:01.251118599 +0000 @@ -65,3 +65,6 @@ main (void) FOR_EACH_TYPE (DO_TEST) return 0; } + +/* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c 2019-03-08 18:15:02.292871138 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c 2019-11-11 18:31:01.251118599 +0000 @@ -95,3 +95,6 @@ main (void) /* { dg-final { scan-tree-dump {no alias between [^\n]* when [^\n]* step[^ ]* \* 8[)]* is outside \(-24, 24\)} "vect" { target vect_double } } } */ /* { dg-final { scan-tree-dump {no alias between [^\n]* when [^\n]* step[^ ]* \* 8[)]* is outside \(-32, 32\)} "vect" { target vect_double } } } */ /* { dg-final { scan-tree-dump {run-time check [^\n]* abs \([^*]* \* 8[)]* >= 32} "vect" { target vect_double } } } */ + +/* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c 2019-03-08 18:15:02.252871290 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c 2019-11-11 18:31:01.251118599 +0000 @@ -95,3 +95,6 @@ main (void) /* { dg-final { scan-tree-dump {no alias between [^\n]* when [^\n]* [_a-z][^ ]* \* 8[)]* is outside \[0, 24\)} "vect" { target vect_double } } } */ /* { dg-final { scan-tree-dump {no alias between [^\n]* when [^\n]* [_a-z][^ ]* \* 8[)]* is outside \[0, 32\)} "vect" { target vect_double } } } */ /* { dg-final { scan-tree-dump {run-time check [^\n]* unsigned \([^*]* \* 8[)]* >= 32} "vect" { target vect_double } } } */ + +/* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c 2019-03-08 18:15:02.296871124 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c 2019-11-11 18:31:01.251118599 +0000 @@ -18,4 +18,6 @@ f2 (int *x, long step2, int n) /* { dg-final { scan-tree-dump {need run-time check that [^\n]*step1[^\n]* is nonzero} "vect" } } */ /* { dg-final { scan-tree-dump-not {need run-time check that [^\n]*step2[^\n]* is nonzero} "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an address-based" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ /* { dg-final { scan-tree-dump-times {LOOP VECTORIZED} 2 "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c 2019-11-11 18:31:01.251118599 +0000 @@ -60,3 +60,5 @@ main (void) /* { dg-final { scan-tree-dump {flags: *WAR\n} "vect" { target vect_int } } } */ /* { dg-final { scan-tree-dump-not {flags: [^\n]*ARBITRARY\n} "vect" } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c 2019-11-11 18:31:01.251118599 +0000 @@ -57,3 +57,5 @@ main (void) } /* { dg-final { scan-tree-dump {flags: *WAW\n} "vect" { target vect_int } } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c 2019-11-11 18:31:01.251118599 +0000 @@ -62,3 +62,5 @@ main (void) } /* { dg-final { scan-tree-dump {flags: *RAW\n} "vect" { target vect_int } } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */ Index: gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c =================================================================== --- gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c 2019-11-11 18:30:57.167147102 +0000 +++ gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c 2019-11-11 18:31:01.251118599 +0000 @@ -11,3 +11,5 @@ f (struct s *s1, int a, int b) } /* { dg-final { scan-tree-dump {flags: *[^\n]*MIXED_STEPS} "vect" } } */ +/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */ +/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */