[PATCH] D108386: [GuardWidening] Preserve MemorySSA

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 09:49:53 PDT 2021


nikic created this revision.
nikic added reviewers: asbirlea, reames.
Herald added subscribers: george.burgess.iv, hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As reported on https://bugs.llvm.org/show_bug.cgi?id=51020, the guard widening loop pass doesn't preserve MemorySSA, so it can no longer be scheduled in the same loop pass manager as LICM. However, the loop-schedule.ll test indicates that this is supposed to work.

Fix this by preserving MemorySSA if available, as this seems to be trivial in this case (we only need to drop the memory access for the guards).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108386

Files:
  llvm/lib/Transforms/Scalar/GuardWidening.cpp
  llvm/test/Transforms/GuardWidening/basic-loop.ll
  llvm/test/Transforms/GuardWidening/loop-schedule.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108386.367531.patch
Type: text/x-patch
Size: 6496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210819/a7191186/attachment.bin>


More information about the llvm-commits mailing list