[all-commits] [llvm/llvm-project] 289542: [InstCombine] Fold icmp eq of non-inbounds geps

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Mar 21 02:51:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 289542b1e72dc4fe17093952dfb1b04cce259183
      https://github.com/llvm/llvm-project/commit/289542b1e72dc4fe17093952dfb1b04cce259183
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-gep.ll

  Log Message:
  -----------
  [InstCombine] Fold icmp eq of non-inbounds geps

We can fold equality comparisons of non-inbounds geps to offset
comparison (https://alive2.llvm.org/ce/z/x2Zp8b). The inbounds
requirement is only necessary for relational comparisons.




More information about the All-commits mailing list