[PATCH] D46201: [DA] Use SCEV to conclude DVEntry::EQ in some cases.

Vikram TV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 04:11:00 PDT 2018


tvvikram added inline comments.


================
Comment at: lib/Analysis/DependenceAnalysis.cpp:3654
+      !SE->isLoopInvariant(DstSCEV, DstL)) {
+    const SCEV *DiffSCEV = SE->getMinusSCEV(SrcSCEV, DstSCEV);
+    if (DiffSCEV->isZero()) {
----------------
Even I am facing a similar issue. What happens if the access is something like A[(i + j) * n] = A[(i + j) * n] + 10, where n can be 0. In this case, the dependence would be "*" and not "=" right? Maybe just checking if difference is zero wouldn't be enough but traversing the SCEV to see that it is simple/understandable would be necessary.


https://reviews.llvm.org/D46201





More information about the llvm-commits mailing list