[PATCH] D48853: [SCEV] Add [zs]ext{C, +, x} -> (D + [zs]ext{C-D, +, x})<nuw><nsw> transform

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 11:40:35 PDT 2018


rtereshin updated this revision to Diff 156116.
rtereshin retitled this revision from "[SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw> transform" to "[SCEV] Add [zs]ext{C,+,x} -> (D + [zs]ext{C-D,+,x})<nuw><nsw> transform".
rtereshin edited the summary of this revision.
rtereshin added a comment.
Herald added a subscriber: dmgreen.

I've moved away from using `KnownBits`, extended the proposed transformation to `AddRec`s, generalized it for signed extensions as well, and unified it all with pre-existing sext-only transformations that handle a strict subset of cases.

There are 2 separate commits here planned, first non-intrusively adds `zext(C + x + ...) -> (D + zext(C-D + x + ...))<nuw><nsw>` transformation only (in it's no-KnownBits / no-API-changes version that could be seen in this patch) along with the tests from the initial version of this patch (mostly LoadStoreVectorizer-related), while the second commit brings the rest (as well as adds SLPVectorizer-targeting tests).

Hopefully this is better now.


Repository:
  rL LLVM

https://reviews.llvm.org/D48853

Files:
  lib/Analysis/ScalarEvolution.cpp
  test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
  test/Transforms/IndVarSimplify/shrunk-constant.ll
  test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
  test/Transforms/SLPVectorizer/X86/consecutive-access.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48853.156116.patch
Type: text/x-patch
Size: 24272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/5e92b771/attachment-0001.bin>


More information about the llvm-commits mailing list