From: Richard Sandiford Date: Sat, 16 Nov 2019 11:42:53 +0000 (+0000) Subject: Print the type of alias check in a dump message X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4d1b635737a4780e5be247f8be9550eaf83dae5;p=gcc.git Print the type of alias check in a dump message This patch prints a message to say how an alias check is being implemented. 2019-11-16 Richard Sandiford 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. From-SVN: r278353 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31b5afce86f..c194a0aa58c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-16 Richard Sandiford + + * tree-data-ref.c (create_intersect_range_checks_index) + (create_intersect_range_checks): Print dump messages. + 2019-11-16 Richard Sandiford * tree-data-ref.c (dump_alias_pair): New function. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eb6060c8e92..c701507ec3e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2019-11-16 Richard Sandiford + + * 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. + 2019-11-16 Richard Sandiford * gcc.dg/vect/vect-alias-check-8.c: Test for the RAW flag. diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c index c2b1c773047..3887120b747 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-1.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c index 0e6285e4a23..b6cc309dbe8 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-10.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c index a0d5abc3aa4..09a4ebfa69e 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-11.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c index 788cdfc3cdc..63a897f4bad 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-12.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c index 60bc4730724..812aa9027dd 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-13.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c index 35b16b70b91..87045c92424 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-14.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c index d868c43130f..ad8d69e2fe0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-15.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c index 97ab77e7257..81c252dfc23 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-16.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c index 0c8bec3c5e3..c49c497c2d0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-17.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c index df1969850ec..6cd0219495c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-8.c @@ -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" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c index f771462c6b9..a7fc1fcebbb 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c +++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-9.c @@ -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" } } */ diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 7fc401f2a59..527cb5eca9c 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -1889,6 +1889,8 @@ create_intersect_range_checks_index (class loop *loop, tree *cond_expr, else *cond_expr = part_cond_expr; } + if (dump_enabled_p ()) + dump_printf (MSG_NOTE, "using an index-based overlap test\n"); return true; } @@ -2036,6 +2038,8 @@ create_intersect_range_checks (class loop *loop, tree *cond_expr, = 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