[all-commits] [llvm/llvm-project] c95896: [LoopInterchange] Assume LCSSA PHI incoming value ...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Wed Jun 3 03:47:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c958962c157b728e153b6232b800cbf556812545
      https://github.com/llvm/llvm-project/commit/c958962c157b728e153b6232b800cbf556812545
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    A llvm/test/Transforms/LoopInterchange/lcssa-incoming-value-is-not-instr.ll

  Log Message:
  -----------
  [LoopInterchange] Assume LCSSA PHI incoming value may not be instruction (#201069)

This patch fixes one of the assertion failures reported in #200819. The
root cause in this case is that `moveLCSSAPhis` assumes the incoming
values of LCSSA PHIs are always instructions and unconditionally casts
them to `Instruction`.
This assumption does not always hold, especially when the incoming value
is a constant. For such LCSSA PHI nodes, it's enough to merely replace
all the uses with its incoming value.



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