[all-commits] [llvm/llvm-project] 7ce1a1: [InstCombine] Fold dependent IVs (#81151)

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Feb 21 00:15:00 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ce1a11f7f436234ce3eaf11c74043937a1ec36b
      https://github.com/llvm/llvm-project/commit/7ce1a11f7f436234ce3eaf11c74043937a1ec36b
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
    M llvm/test/Transforms/InstCombine/dependent-ivs.ll

  Log Message:
  -----------
  [InstCombine] Fold dependent IVs (#81151)

Fold `iv = phi(start, iv.next = iv2.next + start)` where `iv2 =
phi(iv2.start, iv2.next = iv2 + iv2.step)`
to  `iv = iv2 + start` removing one induction variable from the loop.

Proof: https://alive2.llvm.org/ce/z/hfmwgf

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



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