[PATCH] [DependenceAnalysis] Fix for PR21585: collectUpperBound triggers asserts

hfinkel at anl.gov hfinkel at anl.gov
Thu May 14 13:18:17 PDT 2015


LGTM too (aside from some minor issues below)


================
Comment at: lib/Analysis/DependenceAnalysis.cpp:837
@@ +836,3 @@
+        SE->getTypeSizeInBits(UB->getType())) {
+      if (!AddRec->getNoWrapFlags()) {
+        return false;
----------------
Don't need {} here.

================
Comment at: lib/Analysis/DependenceAnalysis.cpp:864
@@ +863,3 @@
+        SE->getTypeSizeInBits(UB->getType())) {
+      if (!AddRec->getNoWrapFlags()) {
+        return false;
----------------
Don't need {} here.

================
Comment at: lib/Analysis/DependenceAnalysis.cpp:969
@@ -950,3 +968,3 @@
     const SCEV *UB = SE->getBackedgeTakenCount(L);
-    return SE->getNoopOrZeroExtend(UB, T);
+    return SE->getTruncateOrZeroExtend(UB, T);
   }
----------------
Please add a comment here explaining that cases without nowrap flags should have been rejected earlier.

http://reviews.llvm.org/D9455

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list