[PATCH] D139601: [LoopVectorize] Clear cache of `LoopAccessInfoManager`

Miguel Saldivar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 17:44:38 PST 2023


Saldivarcher marked 4 inline comments as done.
Saldivarcher added a comment.

In D139601#4029994 <https://reviews.llvm.org/D139601#4029994>, @fhahn wrote:

>> As #59319 describes, enabling LoopDistribute along with LoopVectorize causes an assertion to be hit. The reason seems to be because the LoopDistribute pass doesn't clear out the cache of the LoopAccessInfoManager.
>
> This needs updating, the reason is that we cache LAI during LoopDistribute, LoopVectorize makes changes that invalidate SCEV and then we re-use the cache LAI which references invalid SCEV expressions.

Updated!



================
Comment at: llvm/test/Transforms/LoopVectorize/X86/pr59319.ll:8
+define void @reduced(i32* %0, i32* %1, i64 %iv, i32* %2, i64 %iv76, i64 %iv93) {
+; CHECK-LABEL: @reduced(
+entry:
----------------
fhahn wrote:
> It still would be good to make sure the IR we generate makes sense. You can use `llvm/utils/update_test_checks.py` to generate checks.
Addressed all the comments. TIL about `update_test_checks.py`, thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139601/new/

https://reviews.llvm.org/D139601



More information about the llvm-commits mailing list