[PATCH] D21398: [IVUser] Add a trunc if used only by a single IV user

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 14:07:40 PDT 2016


junbuml retitled this revision from "[LSR] Use post-inc expression for post-inc user" to "[IVUser] Add a trunc if used only by a single IV user".
junbuml updated the summary for this revision.
junbuml updated this revision to Diff 61822.
junbuml added a comment.

> (1) Fix IVUsers so that the truncate is itself the IV users. Maybe do this only if the trunc has a single user and/or the use it itself not an "interesting" SCEV. Then LSR will see the same SCEV recurrence for all users. This will be easy, but I don't know if it will mess up any other cases.


Based on Andrew's suggestion #1, updated the patch and summary.

Looked at the disassembly diffs in spec2000/2006. This patch is not applied in spec2000, but applied in 6 benchmarks (hmmer,h264ref, omnetpp, gobmk, sphinx3, and gcc) in Spec2006. Except gcc in which one more add instruction is added in a loop, all diffs looks reasonable to me as it remove more instructions. I will continue running performance tests and update with them.


http://reviews.llvm.org/D21398

Files:
  include/llvm/Analysis/IVUsers.h
  lib/Analysis/IVUsers.cpp
  test/Transforms/LoopStrengthReduce/AArch64/lsr-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21398.61822.patch
Type: text/x-patch
Size: 4882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160624/46d3d7fa/attachment.bin>


More information about the llvm-commits mailing list