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

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 11:18:21 PDT 2015


mcrosier created this revision.
mcrosier added reviewers: hfinkel, jmolloy, chandlerc, mssimpso, gberry.
mcrosier added a subscriber: llvm-commits.
mcrosier set the repository for this revision to rL LLVM.

This change adds support for transforming loops such as

void test (unsigned *f) {
  for (int i = 65536; i >= 0; i--) {
     f[i] = 0;
  }
}

into memsets.  Previously, we were unable to transform loops with negative strides.

Passes all correctness for Spec2000, Spec2006, and LNT.  Transforms a number of benchmarks in Spec2000 and Spec2006.

Please take a look.

 Chad

Repository:
  rL LLVM

http://reviews.llvm.org/D14125

Files:
  lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  test/Transforms/LoopIdiom/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14125.38573.patch
Type: text/x-patch
Size: 5652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151027/32b88d4a/attachment.bin>


More information about the llvm-commits mailing list