[all-commits] [llvm/llvm-project] 65d59b: [LoopDeletion] Fix deletion with unusual predecess...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jul 1 07:13:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 65d59b42658fdea49898c125f48f20a93de9d156
      https://github.com/llvm/llvm-project/commit/65d59b42658fdea49898c125f48f20a93de9d156
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-01 (Fri, 01 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    A llvm/test/Transforms/LoopDeletion/pr56266.ll

  Log Message:
  -----------
  [LoopDeletion] Fix deletion with unusual predecessor terminator (PR56266)

LoopSimplify only requires that the loop predecessor has a single
successor and is safe to hoist into -- it doesn't necessarily have
to be an unconditional BranchInst.

Adjust LoopDeletion to assert conditions closer to what it actually
needs for correctness, namely a single successor and a
side-effect-free terminator (as the terminator is getting dropped).

Fixes https://github.com/llvm/llvm-project/issues/56266.




More information about the All-commits mailing list