[all-commits] [llvm/llvm-project] 092b6e: [InstCombine] Handle "add like" in ADD+GEP->GEP+GE...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Mon Apr 14 08:11:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 092b6e73e651469527662443b592f98f442ece72
      https://github.com/llvm/llvm-project/commit/092b6e73e651469527662443b592f98f442ece72
  Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2025-04-14 (Mon, 14 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/array.ll
    M llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll
    M llvm/test/Transforms/InstCombine/gep-vector.ll
    M llvm/test/Transforms/InstCombine/vscale_gep.ll
    M llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
    M llvm/test/Transforms/LoopVectorize/SystemZ/addressing.ll
    M llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
    M llvm/test/Transforms/LoopVectorize/X86/interleaving.ll
    M llvm/test/Transforms/LoopVectorize/X86/parallel-loops.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
    M llvm/test/Transforms/LoopVectorize/float-induction.ll
    M llvm/test/Transforms/LoopVectorize/forked-pointers.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll
    M llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
    M llvm/test/Transforms/LoopVectorize/reduction-inloop-cond.ll
    M llvm/test/Transforms/LoopVectorize/reduction-inloop-pred.ll
    M llvm/test/Transforms/LoopVectorize/reduction-inloop-uf4.ll
    M llvm/test/Transforms/LoopVectorize/reduction-predselect.ll
    M llvm/test/Transforms/LoopVectorize/reduction.ll

  Log Message:
  -----------
  [InstCombine] Handle "add like" in ADD+GEP->GEP+GEP rewrites (#135156)

Considering that "or disjoint" is the canonical for certain add
operations, then I think we want to support such "add like" operations
when doing ADD+GEP->GEP+GEP rewrites to make things more consistent.

Problem was found when improving ValueTracking, which turned an ADD into
OR, and then suddenly optimizations got worse due to these rewrites no
longer triggering.



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