[PATCH] D108507: [NFC][LoopIdiom] Add more test case to runtime-determined memset size

Yueh-Ting Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 16 10:17:03 PDT 2021


eopXD updated this revision to Diff 380199.
eopXD marked an inline comment as done.
eopXD added a comment.

Adjust tescases to show its relationship with D108112 <https://reviews.llvm.org/D108112>.

@bmahjour

> What's the dependency between this patch and D108112 <https://reviews.llvm.org/D108112>?

There was only 64-bit test cases when I was doing D108112 <https://reviews.llvm.org/D108112>.
Then in the comments you questioned on how would LIR perform under 32bit mode.
So I opened this patch to split original test file with only 64-bit mode test case into 2 files that contains 32bit mode test case and 64bit mode test case.

You can see the optimization of LIR `@NestedFor32` and `@NestedFor64` are different under 32bit mode and 64bit mode.
It is because the SCEV will be transformed when LIR deals with the inner-loop and lets the SCEV not be recognize when LIR goes through the outer-loop.

In D108112 <https://reviews.llvm.org/D108112>, the SCEV rewriter will rewrite the SCEV to a form LIR can recognize and let the outer-loop also be optimized.

> Should we expect to see the updates made to memset-runtime.ll under that patch to apply on top of this change?

Yes. D108112 <https://reviews.llvm.org/D108112> should modify upon the test case this patch provides.
The checks of `@NestedFor32` and `@NestedFor64` will change in because of the SCEV rewriter.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108507/new/

https://reviews.llvm.org/D108507

Files:
  llvm/test/Transforms/LoopIdiom/memset-runtime-32bit.ll
  llvm/test/Transforms/LoopIdiom/memset-runtime-64bit.ll
  llvm/test/Transforms/LoopIdiom/memset-runtime.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108507.380199.patch
Type: text/x-patch
Size: 35548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211016/ea17df9b/attachment.bin>


More information about the llvm-commits mailing list