[all-commits] [llvm/llvm-project] a21670: [InstCombine] Merge one-use GEP offsets during exp...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jul 21 01:50:00 PDT 2025


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

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

  Log Message:
  -----------
  [InstCombine] Merge one-use GEP offsets during expansion (#147263)

When expanding a GEP chain, if there is a chain of one-use GEPs followed
by a multi-use GEP, rewrite the multi-use GEP to include the one-use
GEPs offsets.

This means the offsets from the one-use GEPs can be reused by the offset
expansion without additional cost (from computing them again with a
different reassociation).



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