[all-commits] [llvm/llvm-project] 2dc44b: [InstCombine] Fix multi-use handling for multi-GEP...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jul 2 07:45:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dc44b3a7ba1d70f823a1a13d6364d2738ede6c3
      https://github.com/llvm/llvm-project/commit/2dc44b3a7ba1d70f823a1a13d6364d2738ede6c3
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-07-02 (Wed, 02 Jul 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/sub-gep.ll

  Log Message:
  -----------
  [InstCombine] Fix multi-use handling for multi-GEP rewrite (#146689)

If we're expanding offsets for a chain of GEPs in RewriteGEPs mode, we
should also rewrite GEPs that have one-use themselves, but are kept
alive by a multi-use GEP later in the chain.

For the sake of simplicity, I've changed this to just skip the one-use
condition entirely (which will perform an unnecessary rewrite of a no
longer used GEP, but shouldn't otherwise matter).



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