[PATCH] D14125: [LIR] Add support for creating memsets from loops with a negative stride.

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 13:51:47 PDT 2015


mssimpso added a comment.

This looks reasonable to me, but I'll let someone else approve.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:33
@@ -32,3 +32,3 @@
 //     for (i) { __real__(*P) = 0;  __imag__(*P) = 0; }
 //
 // We should enhance this to handle negative strides through memory.
----------------
You can update this comment to reflect that we can handle negative strides with this patch. Loop reversal is a separate optimization, so I think it makes sense to catch the simple case here, especially since the implementation is minimal. The follow-on patch would be to handle the negative stride in processLoopMemSet.


Repository:
  rL LLVM

http://reviews.llvm.org/D14125





More information about the llvm-commits mailing list