[all-commits] [llvm/llvm-project] a0a2a1: [LoopPeel] Make sure exit condition has a single u...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sun May 18 03:49:06 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0a2a1e095ddd092e668b0b3f9a7dfa9655255e1
      https://github.com/llvm/llvm-project/commit/a0a2a1e095ddd092e668b0b3f9a7dfa9655255e1
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-05-18 (Sun, 18 May 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/test/Transforms/LoopUnroll/peel-last-iteration.ll

  Log Message:
  -----------
  [LoopPeel] Make sure exit condition has a single use when peeling last.

Update the check in canPeelLastIteration to make sure the exiting
condition has a single use. When peeling the last iteration, we adjust
the condition in the loop body to be true one iteration early, which
would be incorrect for other users.

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



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