diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2016-11-03 16:39:25 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2016-11-03 16:39:25 +0000 |
| commit | fca1ff0da2b1b920b3e684d1f0b6ac78b75dab32 (patch) | |
| tree | 5df294dae0949c146824406d34e1784914e29040 /llvm/lib/Transforms | |
| parent | 0e5df9fc156b248eecc1ac54ca51518de4d8914b (diff) | |
| download | bcm5719-llvm-fca1ff0da2b1b920b3e684d1f0b6ac78b75dab32.tar.gz bcm5719-llvm-fca1ff0da2b1b920b3e684d1f0b6ac78b75dab32.zip | |
Fix a bug found by inspection by PVS-Studio.
This condition is trivially always true prior to the change. The comment
at the call site makes it clear that we expect *all* of these to be '=',
'S', or 'I' so fix the code.
We have a bug I will update to track the fact that Clang doesn't warn on
this: http://llvm.org/PR13101
llvm-svn: 285930
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopInterchange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp index e7fa5097c5e..e9f84edd1cb 100644 --- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp +++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp @@ -205,7 +205,7 @@ static bool isOuterMostDepPositive(CharMatrix &DepMatrix, unsigned Row, static bool containsNoDependence(CharMatrix &DepMatrix, unsigned Row, unsigned Column) { for (unsigned i = 0; i < Column; ++i) { - if (DepMatrix[Row][i] != '=' || DepMatrix[Row][i] != 'S' || + if (DepMatrix[Row][i] != '=' && DepMatrix[Row][i] != 'S' && DepMatrix[Row][i] != 'I') return false; } |

