[PATCH] D27518: Moving isComplex decision to TTI

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 10:55:01 PST 2017


mkuper added a comment.

LGTM, except that I'm not sure I understand what's going on with negative strides in isConstantStridedAccessLessThan().



================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:450
+      return false;
+    return StrideVal.getSExtValue() < MergeDistance;
+  }
----------------
Can we get here with negative stride values?

If we can't, then I'm not sure why you get the sext value - and why MergeDistance is signed.
If we can,  then you probably don't want to return true for any negative value.

(I realize this was the way in the original, but as long as you're touching the code...)


https://reviews.llvm.org/D27518





More information about the llvm-commits mailing list