diff options
author | Richard Biener <rguenther@suse.de> | 2021-07-02 08:51:43 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-07-02 08:54:32 +0200 |
commit | c4804ff24401733e3b470a49b8a6c9306e6cfcfa (patch) | |
tree | 23b9d74235addf11175503c327c2d25775e61033 /gcc | |
parent | 1aeefa5720a71e622e2f26bf10ec8e7ecbd76f4c (diff) | |
download | gcc-c4804ff24401733e3b470a49b8a6c9306e6cfcfa.zip gcc-c4804ff24401733e3b470a49b8a6c9306e6cfcfa.tar.gz gcc-c4804ff24401733e3b470a49b8a6c9306e6cfcfa.tar.bz2 |
tree-optimization/101280 - re-revise interchange fix for PR101173
The following fixes up the revision of the original fix for PR101173
to properly guard all dependence checks with DDR_REVERSED_P or its
inverse.
2021-07-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/101280
PR tree-optimization/101173
* gimple-loop-interchange.cc
(tree_loop_interchange::valid_data_dependences): Properly
guard all dependence checks with DDR_REVERSED_P or its
inverse.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-loop-interchange.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc index 43ef112..7a88faa 100644 --- a/gcc/gimple-loop-interchange.cc +++ b/gcc/gimple-loop-interchange.cc @@ -1044,9 +1044,9 @@ tree_loop_interchange::valid_data_dependences (unsigned i_idx, unsigned o_idx, /* Be conservative, skip case if either direction at i_idx/o_idx levels is not '=' or '<'. */ - if (dist_vect[i_idx] < 0 + if ((!DDR_REVERSED_P (ddr) && dist_vect[i_idx] < 0) || (DDR_REVERSED_P (ddr) && dist_vect[i_idx] > 0) - || dist_vect[o_idx] < 0 + || (!DDR_REVERSED_P (ddr) && dist_vect[o_idx] < 0) || (DDR_REVERSED_P (ddr) && dist_vect[o_idx] > 0)) return false; } |