[all-commits] [llvm/llvm-project] f66e87: [LoopSimplifyCFG] Add check for missing loop prehe...

Justus Klausecker via All-commits all-commits at lists.llvm.org
Thu Jul 24 02:59:06 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f66e8745047ea04958e13bf02bae75ab15805e3c
      https://github.com/llvm/llvm-project/commit/f66e8745047ea04958e13bf02bae75ab15805e3c
  Author: Justus Klausecker <117751770+Justus2308 at users.noreply.github.com>
  Date:   2025-07-24 (Thu, 24 Jul 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
    A llvm/test/Transforms/LoopSimplifyCFG/enter-through-indirectbr.ll

  Log Message:
  -----------
  [LoopSimplifyCFG] Add check for missing loop preheader (#149743)

Closes #147869
Closes #149679

Adds a check for a missing loop preheader during analysis. This fixes a
nullptr dereference that happened whenever LoopSimplify was unable to
generate a preheader because the loop was entered by an indirectbr
instruction (as stated in the LoopSimplify.cpp doc comment).

(cherry picked from commit 04107209856bb39e041aa38cf40de0afa90a6b2d)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list