[all-commits] [llvm/llvm-project] b27ab0: [InstCombine] Preserve flags for difference of gep...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 10 07:21:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b27ab06a3d3f7f37496c5fa4dc367a3be0a8498d
      https://github.com/llvm/llvm-project/commit/b27ab06a3d3f7f37496c5fa4dc367a3be0a8498d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

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

  Log Message:
  -----------
  [InstCombine] Preserve flags for difference of gep chains (#143488)

When expanding the offset of a GEP chain via a series of adds, try to
preserve the nsw/nuw flags based on inbounds/nuw. This is a followup to
https://github.com/llvm/llvm-project/pull/142958.

Proof: https://alive2.llvm.org/ce/z/8HiFYY (note that preserving nsw in
the nusw case is not valid)



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