[all-commits] [llvm/llvm-project] d9971b: [InstCombine] Make foldCmpLoadFromIndexedGlobal mo...

David Green via All-commits all-commits at lists.llvm.org
Sun Aug 3 02:20:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9971be83e5d23631b04b3ce40bfb2be01b6085e
      https://github.com/llvm/llvm-project/commit/d9971be83e5d23631b04b3ce40bfb2be01b6085e
  Author: David Green <david.green at arm.com>
  Date:   2025-08-03 (Sun, 03 Aug 2025)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/load-cmp.ll

  Log Message:
  -----------
  [InstCombine] Make foldCmpLoadFromIndexedGlobal more resilient to non-array geps. (#150639)

My understanding is that gep [n x i8] and gep i8 can be treated
equivalently - the array type conveys no extra information and could be
removed. This goes through foldCmpLoadFromIndexedGlobal and tries to
make it work for non-array gep types, so long as the index type still
matches the array being loaded.



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