llvm-project/llvm/test/Transforms/LoopIdiom
David Sherwood 816663adb5 [SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors
The function LoopIdiomRecognize::isLegalStore looks for stores in loops
that could be transformed into memset or memcpy. However, the algorithm
currently requires that we know how big the store is at runtime, i.e.
that the store size will not overflow an unsigned integer. For scalable
vectors we cannot guarantee this so I have changed the code to bail out
for now. In addition, even if we add a way to query the maximum value of
vscale in future we will still need to update the algorithm to cope with
non-constant strides. The additional cost associated with calculating
the memset and memcpy arguments will need to be taken into account as
well.

This patch also fixes up an implicit TypeSize -> uint64_t cast,
thereby removing a warning. I've added tests here showing a fixed
width vector loop being transformed into memcpy, and a scalable
vector loop remaining unchanged:

  Transforms/LoopIdiom/memcpy-vectors.ll

Differential Revision: https://reviews.llvm.org/D87439
2020-09-14 11:28:31 +01:00
..
AMDGPU
ARM
X86 [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
basic-address-space.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
basic.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
crash.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
ctpop-multiple-users-crash.ll
dbginfo-cost.ll
debug-line.ll
disable-options.ll [LoopIdiomRecognizePass] Options to disable part or the entire Loop Idiom Recognize Pass 2020-09-01 13:59:24 +00:00
expander-do-not-delete-reused-values.ll [LoopIdiom,LSR] Add additional tests for SCEVExpander cleanups. 2020-08-21 13:48:31 +01:00
int_sideeffect.ll
lir-heurs-multi-block-loop.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
memcpy-debugify-remarks.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
memcpy-vectors.ll [SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors 2020-09-14 11:28:31 +01:00
memset-debugify-remarks.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
memset_noidiom.ll
non-canonical-loop.ll
non-integral-pointers.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
nontemporal_store.ll
phi-insertion.ll [LoopIdiom] Add additional test cases. 2020-07-23 13:53:26 +01:00
pr28196.ll [IR] Convert null-pointer-is-valid into an enum attribute 2020-05-15 19:41:07 +02:00
pr33114.ll
reuse-cast.ll [SCEVExpander] Avoid re-using existing casts if it means updating users. 2020-08-09 13:25:17 +01:00
scev-invalidation.ll
scev-invalidation_topmostloop.ll
struct-custom-dl.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
struct.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
struct_pattern.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
unordered-atomic-memcpy-noarch.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
unroll-custom-dl.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
unroll.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
unsafe.ll
unwind.ll