forked from OSchip/llvm-project
816663adb5
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 |
||
---|---|---|
.. | ||
AMDGPU | ||
ARM | ||
X86 | ||
basic-address-space.ll | ||
basic.ll | ||
crash.ll | ||
ctpop-multiple-users-crash.ll | ||
dbginfo-cost.ll | ||
debug-line.ll | ||
disable-options.ll | ||
expander-do-not-delete-reused-values.ll | ||
int_sideeffect.ll | ||
lir-heurs-multi-block-loop.ll | ||
memcpy-debugify-remarks.ll | ||
memcpy-vectors.ll | ||
memset-debugify-remarks.ll | ||
memset_noidiom.ll | ||
non-canonical-loop.ll | ||
non-integral-pointers.ll | ||
nontemporal_store.ll | ||
phi-insertion.ll | ||
pr28196.ll | ||
pr33114.ll | ||
reuse-cast.ll | ||
scev-invalidation.ll | ||
scev-invalidation_topmostloop.ll | ||
struct-custom-dl.ll | ||
struct.ll | ||
struct_pattern.ll | ||
unordered-atomic-memcpy-noarch.ll | ||
unroll-custom-dl.ll | ||
unroll.ll | ||
unsafe.ll | ||
unwind.ll |