[PATCH] D97667: [loop-idiom] Hoist loop memcpys to loop preheader
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 02:46:55 PDT 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:868-870
+ // Check if the load stride matches the store stride.
+ if (StrIntStride != LoadIntStride && StrIntStride != -LoadIntStride)
+ return false;
----------------
lebedev.ri wrote:
> This doesn't make sense. Strides of load and store must match exactly.
> Doesn't this miscompile the case where load goes forward and store backward or vice verse?
Also, i would like to see better test coverage:
1. negative stride
2. load/store stride sign mismatch
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97667/new/
https://reviews.llvm.org/D97667
More information about the llvm-commits
mailing list