[all-commits] [llvm/llvm-project] a0b911: LoopDeletion: Move EH pad check before the isLoopN...

Manish Kausik H via All-commits all-commits at lists.llvm.org
Fri Jan 19 06:30:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0b911745494e3c2f53a27f23c536314818ce0b1
      https://github.com/llvm/llvm-project/commit/a0b911745494e3c2f53a27f23c536314818ce0b1
  Author: Manish Kausik H <46352931+Nirhar at users.noreply.github.com>
  Date:   2024-01-19 (Fri, 19 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopDeletion.cpp
    A llvm/test/Transforms/LoopDeletion/loop-with-ehpad-not-executed.ll

  Log Message:
  -----------
  LoopDeletion: Move EH pad check before the isLoopNeverExecuted Check (#78189)

This commit modifies `LoopDeletion::deleteLoopIfDead` to check if the
exit block of a loop is an EH pad before checking if the loop gets
executed. This handles the case where an unreachable loop has a
landingpad as an Exit block, and the loop gets deleted, leaving leaving
the landingpad without an edge from an unwind clause.

Fixes #76852.




More information about the All-commits mailing list