[all-commits] [llvm/llvm-project] 8cf5b6: [GuardWidening] Preserve MemorySSA

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Aug 19 11:25:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8cf5b69f69bf95413f4009eddd94b2cc0a2d3412
      https://github.com/llvm/llvm-project/commit/8cf5b69f69bf95413f4009eddd94b2cc0a2d3412
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-08-19 (Thu, 19 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GuardWidening.cpp
    M llvm/test/Transforms/GuardWidening/basic-loop.ll
    M llvm/test/Transforms/GuardWidening/loop-schedule.ll

  Log Message:
  -----------
  [GuardWidening] Preserve MemorySSA

As reported on https://bugs.llvm.org/show_bug.cgi?id=51020, the
guard widening 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 removed guards).

Differential Revision: https://reviews.llvm.org/D108386




More information about the All-commits mailing list