llvm-project/llvm/test/Transforms/LoadStoreVectorizer/X86
Roman Tereshin 1ba1f9310c [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw><nsw> transform
if the top level addition in (D + (C-D + x + ...)) could be proven to
not wrap, where the choice of D also maximizes the number of trailing
zeroes of (C-D + x + ...), ensuring homogeneous behaviour of the
transformation and better canonicalization of such expressions.

This enables better canonicalization of expressions like

  1 + zext(5 + 20 * %x + 24 * %y)  and
      zext(6 + 20 * %x + 24 * %y)

which get both transformed to

  2 + zext(4 + 20 * %x + 24 * %y)

This pattern is common in address arithmetics and the transformation
makes it easier for passes like LoadStoreVectorizer to prove that 2 or
more memory accesses are consecutive and optimize (vectorize) them.

Reviewed By: mzolotukhin

Differential Revision: https://reviews.llvm.org/D48853

llvm-svn: 337859
2018-07-24 21:48:56 +00:00
..
codegenprepare-produced-address-math.ll [SCEV] Add zext(C + x + ...) -> D + zext(C-D + x + ...)<nuw><nsw> transform 2018-07-24 21:48:56 +00:00
correct-order.ll
lit.local.cfg
load-width.ll
merge-tbaa.ll NFC - Various typo fixes in tests 2018-07-04 13:28:39 +00:00
non-byte-size.ll
preserve-order32.ll
preserve-order64.ll
subchain-interleaved.ll
vector-scalar.ll [LoadStoreVectorizer] Differentiate between <1 x T> and T 2018-03-07 10:29:28 +00:00