[all-commits] [llvm/llvm-project] cd16b0: IR: introduce CmpInst::isEquivalence (#111979)

Ramkumar Ramachandra via All-commits all-commits at lists.llvm.org
Mon Nov 4 07:55:22 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd16b077bf4bc6d55e06c41fa0f6774ac05dcb56
      https://github.com/llvm/llvm-project/commit/cd16b077bf4bc6d55e06c41fa0f6774ac05dcb56
  Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/test/Transforms/GVN/edge.ll

  Log Message:
  -----------
  IR: introduce CmpInst::isEquivalence (#111979)

Steal impliesEquivalanceIf{True,False} (sic) from GVN, and extend it for
floating-point constant vectors, and accounting for denormal values.
Since InstCombine also performs GVN-like replacements, introduce
CmpInst::isEquivalence, and remove the corresponding code in GVN, with
the intent of using it in more places.

The code in GVN also has a bad FIXME saying that the optimization may be
valid in the nsz case, but this is not the case.

Alive2 proof: https://alive2.llvm.org/ce/z/vEaK8M



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